<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- saved from url=(0080)http://www.whizlabs.com/examprep/mod/quiz/review.php?attempt=170626&showall=true -->
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    
<link rel="stylesheet" type="text/css" href="./OCPJP 6 - Exam Simulator  Practice Test II_files/styles.php">
<link rel="stylesheet" type="text/css" href="./OCPJP 6 - Exam Simulator  Practice Test II_files/styles(1).php">

<!--[if IE 7]>
    <link rel="stylesheet" type="text/css" href="http://www.whizlabs.com/examprep/theme/standard/styles_ie7.css" />
<![endif]-->
<!--[if IE 6]>
    <link rel="stylesheet" type="text/css" href="http://www.whizlabs.com/examprep/theme/standard/styles_ie6.css" />
<![endif]-->


    <meta name="keywords" content="moodle, OCPJP 6 - Exam Simulator: Practice Test II ">
    <title>OCPJP 6 - Exam Simulator: Practice Test II</title>
    <link rel="shortcut icon" href="http://www.whizlabs.com/examprep/theme/ability-to-learn/favicon.ico">
    <!--<style type="text/css">/*<![CDATA[*/ body{behavior:url(http://www.whizlabs.com/examprep/lib/csshover.htc);} /*]]>*/</style>-->

<script type="text/javascript" src="./OCPJP 6 - Exam Simulator  Practice Test II_files/javascript-static.js"></script>
<script type="text/javascript" src="./OCPJP 6 - Exam Simulator  Practice Test II_files/javascript-mod.php"></script>
<script type="text/javascript" src="./OCPJP 6 - Exam Simulator  Practice Test II_files/overlib.js"></script>
<script type="text/javascript" src="./OCPJP 6 - Exam Simulator  Practice Test II_files/overlib_cssstyle.js"></script>
<script type="text/javascript" src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cookies.js"></script>
<script type="text/javascript" src="./OCPJP 6 - Exam Simulator  Practice Test II_files/ufo.js"></script>
<script type="text/javascript" src="./OCPJP 6 - Exam Simulator  Practice Test II_files/dropdown.js"></script>  

<script type="text/javascript" defer="defer">
//<![CDATA[
setTimeout('fix_column_widths()', 20);
//]]>
</script>
<script type="text/javascript">
//<![CDATA[
function openpopup(url,name,options,fullscreen) {
  fullurl = "http://www.whizlabs.com/examprep" + url;
  windowobj = window.open(fullurl,name,options);
  if (fullscreen) {
     windowobj.moveTo(0,0);
     windowobj.resizeTo(screen.availWidth,screen.availHeight);
  }
  windowobj.focus();
  return false;
}

function uncheckall() {
  void(d=document);
  void(el=d.getElementsByTagName('INPUT'));
  for(i=0;i<el.length;i++) {
    void(el[i].checked=0);
  }
}

function checkall() {
  void(d=document);
  void(el=d.getElementsByTagName('INPUT'));
  for(i=0;i<el.length;i++) {
    void(el[i].checked=1);
  }
}

function inserttext(text) {
  text = ' ' + text + ' ';
  if ( opener.document.forms['theform'].message.createTextRange && opener.document.forms['theform'].message.caretPos) {
    var caretPos = opener.document.forms['theform'].message.caretPos;
    caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
  } else {
    opener.document.forms['theform'].message.value  += text;
  }
  opener.document.forms['theform'].message.focus();
}

function getElementsByClassName(oElm, strTagName, oClassNames){
	var arrElements = (strTagName == "*" && oElm.all)? oElm.all : oElm.getElementsByTagName(strTagName);
	var arrReturnElements = new Array();
	var arrRegExpClassNames = new Array();
	if(typeof oClassNames == "object"){
		for(var i=0; i<oClassNames.length; i++){
			arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames[i].replace(/\-/g, "\\-") + "(\\s|$)"));
		}
	}
	else{
		arrRegExpClassNames.push(new RegExp("(^|\\s)" + oClassNames.replace(/\-/g, "\\-") + "(\\s|$)"));
	}
	var oElement;
	var bMatchesAll;
	for(var j=0; j<arrElements.length; j++){
		oElement = arrElements[j];
		bMatchesAll = true;
		for(var k=0; k<arrRegExpClassNames.length; k++){
			if(!arrRegExpClassNames[k].test(oElement.className)){
				bMatchesAll = false;
				break;
			}
		}
		if(bMatchesAll){
			arrReturnElements.push(oElement);
		}
	}
	return (arrReturnElements)
}
//]]>
</script>
    
		<style type="text/css">
	<!--
	#main {
		min-height: 500px;
		width: 988px;
		margin: auto;
		background:#fff;
	}
	#header {
		height: 90px;
		width: 988px;
		background-image: url(http://www.whizlabs.com/examprep/theme/ability-to-learn/images/header.gif);
	}
	#navi {
		float: left;
		height: 22px;
		width: 828px;
		padding: 10px 0pt 0pt 20px;
		background-image: url(http://www.whizlabs.com/examprep/theme/ability-to-learn/images/psd-up_02.gif);
	}
	#navi2 {
		height: 32px;
		width: 140px;
		float: left;
		background-image: url(http://www.whizlabs.com/examprep/theme/ability-to-learn/images/part3left.gif);
		text-align: left;
	}
	#left {
		float: left;
		min-height: 675px;
		width: 263px;
	}
	
	#leftinsertdiv {
		float: left;
		height: 58px;
		width: 263px;
		background-image: url(http://www.whizlabs.com/examprep/theme/ability-to-learn/images/psd-left-down_04.gif);
	}
	
	#left3 {
		float: left;
		height: 617px;
		width: 21px;
		/*background-image: url(http://www.whizlabs.com/examprep/theme/ability-to-learn/images/psd-up_05.gif);*/
	}
	
	#left4 {
		height: 58px;
		width: 242px;
		float: right;
	}
	#left5 {
		float: right;
		height: 62px;
		width: 242px;
	}
	#left6 {
		float: right;
		min-height: 160px;
		width: 242px;
		background-image: url(http://www.whizlabs.com/examprep/theme/ability-to-learn/images/psd-up_06-19.gif);
	}
	#right {
		float: left;
		min-height: 601px;
		width: 725px;
		background:#fff;
	}
	#leftfooter {
		float: left;
		height: 159px;
		width: 263px;
		background-image: url(http://www.whizlabs.com/examprep/theme/ability-to-learn/images/footerdiv.gif);
		background-repeat:no-repeat;
	}
	#rightfooter {
		float: left;
		height: 50px;
		width: 725px;
		background-image: url(http://www.whizlabs.com/examprep/theme/ability-to-learn/images/psd-up_10-53.gif);
		background-position:left bottom;
		background-repeat:no-repeat;
		padding-top:90px;
		background-color:#fff;
	}
	#rightfooter2 {
		float: left;
		height: 19px;
		width: 725px;
		background-image: url(http://www.whizlabs.com/examprep/theme/ability-to-learn/images/psd-up_54.gif);
	}
	-->
	</style>
	
<link href="./OCPJP 6 - Exam Simulator  Practice Test II_files/css.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>

</head>
<!-- WANT URL-->

<body class="mod-quiz course-11 dir-ltr lang-en_utf8" id="mod-quiz-review" onload="MM_preloadImages(&#39;http://www.whizlabs.com/examprep/theme/ability-to-learn/images/psd-up_07.gif&#39;,&#39;http://www.whizlabs.com/examprep/theme/ability-to-learn/images/psd-over_05.gif&#39;);">


<div id="main">
  <div id="header"><br>
    <p class="headertxt">Call Us at +1-818-575-6625 | <a href="http://www.whizlabs.com/examprep/login/logout.php?sesskey=RPF1EJUmHb">Sign Out</a> | <a href="http://www.whizlabs.com/index.php?option=com_whizmart&view=cart">My Cart</a> | <a href="http://www.whizlabs.com/examprep/user/view.php">Change Password</a></p>
    <p class="txtheader">Welcome <a href="http://www.whizlabs.com/examprep">Flavio&nbsp;Vit !</a></p>
  </div>


  <div id="navi" class="breadcrumb"><h2 class="accesshide ">You are here</h2> <ul>
<li class="first"><a onclick="this.target=&#39;_top&#39;" href="http://www.whizlabs.com/">Home</a></li><li class="first"> <span class="accesshide ">/&nbsp;</span><span class="arrow sep">»</span> <a onclick="this.target=&#39;_top&#39;" href="http://www.whizlabs.com/examprep/">My Account</a></li><li class="first"> <span class="accesshide ">/&nbsp;</span><span class="arrow sep">»</span> <a onclick="this.target=&#39;_top&#39;" href="http://www.whizlabs.com/examprep/course/view.php?id=11">OCPJP 6 - Exam Simulator</a></li><li class="first"> <span class="accesshide ">/&nbsp;</span><span class="arrow sep">»</span> <a onclick="this.target=&#39;_top&#39;" href="http://www.whizlabs.com/examprep/mod/quiz/view.php?id=2203">Practice Test II</a></li><li class="first"> <span class="accesshide ">/&nbsp;</span><span class="arrow sep">»</span> Review of attempt 1</li></ul>			<div class="navbutton">
				</div>  
  
  <div style="float:right; margin-right:60px;font-size:12px; font-weight:bold; color:#0460AD;">
  	</div>
  </div>

  <div id="navi2">
  <a href="http://www.whizlabs.com/examprep/eddy_report/performance_trak.php?cid=11" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(&#39;Image1&#39;,&#39;&#39;,&#39;http://www.whizlabs.com/examprep/theme/ability-to-learn/images/layerrollov.gif&#39;,1)"><img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/performace_history.gif" name="Image1" width="125" height="32" border="0" id="Image1"></a></div>
    <!-- END OF HEADER -->
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div><h2 class="main">Practice Test II</h2><h2 class="main">Review of attempt 1</h2>
 



<div class="controls">
<div class="singlebutton"><form action="http://www.whizlabs.com/examprep/mod/quiz/view.php" method="get"><div><input type="hidden" name="id" value="2203"><input type="submit" value="Finish review"></div></form></div></div>
<table class="generaltable generalbox quizreviewsummary"><tbody>
<tr><th scope="row" class="cell">Started on</th><td class="cell">Saturday,  17 December 2011, 12:07 PM</td></tr>
<tr><th scope="row" class="cell">Completed on</th><td class="cell">Saturday,  17 December 2011, 12:59 PM</td></tr>
<tr><th scope="row" class="cell">Time taken</th><td class="cell">51 mins 51 secs</td></tr>
<tr><th scope="row" class="cell">Grade</th><td class="cell"><b>36</b> out of a maximum of 60 (<b>60</b>%)</td></tr>
<tr><th scope="row" class="cell">Feedback</th><td class="cell"><p>PASS: Keep it up!</p></td></tr>
</tbody></table>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%201%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q16314" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                1      </div>
      </div>
  <div class="content">
    <div class="qtext">
  Choose the correct option when the following code is compiled and run.<br><br>import java.io.*; <br><br>class Test implements Serializable { }<br><br>class SerializeTest<br>{ <br>
<div style="margin-left: 40px;">public static void main(String[] args)<br></div>
<div style="margin-left: 40px;">{ <br></div>
<div style="margin-left: 80px;">try<br></div>
<div style="margin-left: 80px;">{ <br></div>
<div style="margin-left: 120px;">Test t=new Test(); <br>ObjectOutputStream out=new ObjectOutputStream(new FileOutputStream("Test")); <br>out.writeObject(t); <br>out.close(); <br>ObjectInputStream in=new ObjectInputStream(new FileInputStream("Test")); <br>Test newt= in.readObject(); <br></div>
<div style="margin-left: 80px;">} <br></div>
<div style="margin-left: 80px;">catch(Exception e) <br></div>
<div style="margin-left: 80px;">{ <br></div>
<div style="margin-left: 120px;">e.printStackTrace(); <br></div>
<div style="margin-left: 80px;">} <br></div>
<div style="margin-left: 40px;">} <br></div>}</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp16314_62035" name="resp16314_" type="radio" value="62035">        </td>
        <td class="c1 text correct">
          <label for="resp16314_62035">
            <span class="anun">a<span class="anumsep">.</span></span> Compilation error.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_small.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp16314_62036" name="resp16314_" type="radio" value="62036">        </td>
        <td class="c1 text ">
          <label for="resp16314_62036">
            <span class="anun">b<span class="anumsep">.</span></span> Exception at runtime .            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp16314_62037" name="resp16314_" checked="checked" type="radio" value="62037">        </td>
        <td class="c1 text ">
          <label for="resp16314_62037">
            <span class="anun">c<span class="anumsep">.</span></span> Compiles and run without any error.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_big.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%202%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q16315" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                2      </div>
      </div>
  <div class="content">
    <div class="qtext">
  Choose the option that has correct method name and its description.</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp16315_62038" name="resp16315_" type="radio" value="62038">        </td>
        <td class="c1 text ">
          <label for="resp16315_62038">
            <span class="anun">a<span class="anumsep">.</span></span> Check if the file is a directory.  -&gt; isDir()<br> Delete a directory.  -&gt; delete()<br> Get an array of strings naming the files and directories in a directory. -&gt; list()  <br> Test whether the application can read the file. -&gt; canRead()            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp16315_62039" name="resp16315_" checked="checked" type="radio" value="62039">        </td>
        <td class="c1 text correct">
          <label for="resp16315_62039">
            <span class="anun">b<span class="anumsep">.</span></span> Check if the file is a directory.  -&gt; isDirectory()<br> Delete a directory.  -&gt; delete()<br> Get an array of strings naming the files and directories in a directory. -&gt; list()  <br> Test whether the application can read the file. -&gt; canRead()            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp16315_62040" name="resp16315_" type="radio" value="62040">        </td>
        <td class="c1 text ">
          <label for="resp16315_62040">
            <span class="anun">c<span class="anumsep">.</span></span> Check if the file is a directory.  -&gt; isDirectory()<br> Delete a directory.  -&gt; delete()<br> Get an array of strings naming the files and directories in a directory. -&gt; listFiles()  <br> Test whether the application can read the file. -&gt; canRead()            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp16315_62041" name="resp16315_" type="radio" value="62041">        </td>
        <td class="c1 text ">
          <label for="resp16315_62041">
            <span class="anun">d<span class="anumsep">.</span></span> Check if the file is a directory.  -&gt; isDirectory()<br> Delete a directory.  -&gt; removeDir()<br> Get an array of strings naming the files and directories in a directory. -&gt; list()  <br> Test whether the application can read the file. -&gt; canRead()             <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%203%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q16273" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                3      </div>
      </div>
  <div class="content">
    <div class="qtext">
  Choose the option that compiles and runs fine.</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp16273_61859" name="resp16273_" type="radio" value="61859">        </td>
        <td class="c1 text ">
          <label for="resp16273_61859">
            <span class="anun">a<span class="anumsep">.</span></span> NumberFormat currencyFormat = NumberFormat.getInstance("US"); <br> Number number =  currencyFormat.parse("$5,000.56");            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp16273_61860" name="resp16273_" type="radio" value="61860">        </td>
        <td class="c1 text ">
          <label for="resp16273_61860">
            <span class="anun">b<span class="anumsep">.</span></span> NumberFormat currencyFormat = NumberFormat.getCurrencyInstance("US"); <br> Number number =  currencyFormat.parse("$5,000.56");             <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp16273_61861" name="resp16273_" type="radio" value="61861">        </td>
        <td class="c1 text ">
          <label for="resp16273_61861">
            <span class="anun">c<span class="anumsep">.</span></span> NumberFormat currencyFormat = NumberFormat.getInstance(Locale.US); <br> Number number =  currencyFormat.parse("$5,000.56");              <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp16273_61862" name="resp16273_" checked="checked" type="radio" value="61862">        </td>
        <td class="c1 text correct">
          <label for="resp16273_61862">
            <span class="anun">d<span class="anumsep">.</span></span> NumberFormat currencyFormat = NumberFormat.getCurrencyInstance(Locale.US); <br> Number number =  currencyFormat.parse("$5,000.56");             <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%204%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5326" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                4      </div>
      </div>
  <div class="content">
    <div class="qtext">
  What is the result of compiling and running the following program? <br><br>import java.util.*; <br>import java.util.regex.*;<br><br> class ScannerTest2<br>{<br>
<div style="margin-left: 40px;">public static void main(String[] args) <br>{<br>
  <div style="margin-left: 40px;">String input = "10 apples 20 oranges 33 pears";<br>Scanner s = new Scanner(input).useDelimiter("\\d\\d\\s");<br>while(s.hasNext()) <br>
    <div style="margin-left: 40px;">System.out.print(s.next()); <br></div>s.close(); <br></div>}<br></div>}</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5326_22660" name="resp5326_" type="radio" value="22660">        </td>
        <td class="c1 text ">
          <label for="resp5326_22660">
            <span class="anun">a<span class="anumsep">.</span></span> Compiler error            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5326_22661" name="resp5326_" type="radio" value="22661">        </td>
        <td class="c1 text ">
          <label for="resp5326_22661">
            <span class="anun">b<span class="anumsep">.</span></span> Prints 10 20 33            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5326_22662" name="resp5326_" checked="checked" type="radio" value="22662">        </td>
        <td class="c1 text correct">
          <label for="resp5326_22662">
            <span class="anun">c<span class="anumsep">.</span></span> Prints apples oranges pears            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5326_22663" name="resp5326_" type="radio" value="22663">        </td>
        <td class="c1 text ">
          <label for="resp5326_22663">
            <span class="anun">d<span class="anumsep">.</span></span> None of these            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%205%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5327" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                5      </div>
      </div>
  <div class="content">
    <div class="qtext">
  What is the result of compiling and running the following code ? <br><br>1. StringBuffer s1=new StringBuffer("hello");<br> 2. StringBuffer s2=new StringBuffer("hello");<br> 3. Float f1=9.0F;<br> 4. Double f2=9.0; <br>5. System.out.print(f1.equals(f2)); <br>6. System.out.print(s1==s2);<br> 7. System.out.print(s1.equals(s2));</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5327_22664" name="resp5327_" type="radio" value="22664">        </td>
        <td class="c1 text ">
          <label for="resp5327_22664">
            <span class="anun">a<span class="anumsep">.</span></span> Prints "truetruetrue"            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5327_22665" name="resp5327_" checked="checked" type="radio" value="22665">        </td>
        <td class="c1 text ">
          <label for="resp5327_22665">
            <span class="anun">b<span class="anumsep">.</span></span> Prints "falsefalsetrue"            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_big.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5327_22666" name="resp5327_" type="radio" value="22666">        </td>
        <td class="c1 text correct">
          <label for="resp5327_22666">
            <span class="anun">c<span class="anumsep">.</span></span> Prints "falsefalsefalse"            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_small.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5327_22667" name="resp5327_" type="radio" value="22667">        </td>
        <td class="c1 text ">
          <label for="resp5327_22667">
            <span class="anun">d<span class="anumsep">.</span></span> Compiler error on line 5            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5327_22668" name="resp5327_" type="radio" value="22668">        </td>
        <td class="c1 text ">
          <label for="resp5327_22668">
            <span class="anun">e<span class="anumsep">.</span></span> Compiler error on line 7            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%206%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5328" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                6      </div>
      </div>
  <div class="content">
    <div class="qtext">
  What is the result of compiling and running the following code?<br><br> public class IntegerTest<br>{ <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public static void main(String[] argv)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Integer i1 = new Integer("1");<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Integer i2 = new Integer("2");<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Integer i3 = Integer.valueOf("3"); <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int i4 = i1 + i2 + i3; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(i4);<br> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br>}</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5328_22669" name="resp5328_" type="radio" value="22669">        </td>
        <td class="c1 text ">
          <label for="resp5328_22669">
            <span class="anun">a<span class="anumsep">.</span></span> Compiler error: Integer class has no constructors which take a String argument            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5328_22670" name="resp5328_" type="radio" value="22670">        </td>
        <td class="c1 text ">
          <label for="resp5328_22670">
            <span class="anun">b<span class="anumsep">.</span></span> Compiler error: Incorrect argument passed to the valueOf method            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5328_22671" name="resp5328_" type="radio" value="22671">        </td>
        <td class="c1 text ">
          <label for="resp5328_22671">
            <span class="anun">c<span class="anumsep">.</span></span> Compiler error: Integer objects cannot work with + operator            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5328_22672" name="resp5328_" checked="checked" type="radio" value="22672">        </td>
        <td class="c1 text correct">
          <label for="resp5328_22672">
            <span class="anun">d<span class="anumsep">.</span></span> Prints 6            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5328_22673" name="resp5328_" type="radio" value="22673">        </td>
        <td class="c1 text ">
          <label for="resp5328_22673">
            <span class="anun">e<span class="anumsep">.</span></span> Prints 123            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%207%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5329" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                7      </div>
      </div>
  <div class="content">
    <div class="qtext">
  What is the result of compiling and running the following code? <br><br>class Test<br>{<br>
<div style="margin-left: 40px;"> public static void main(String[] args)<br>{<br>
  <div style="margin-left: 40px;"> Character c=65; // line 1 <br>Character d=new Character('A');<br> if(c&gt;d) // line 3 <br>
    <div style="margin-left: 40px;">System.out.println("True");<br></div> else<br>
    <div style="margin-left: 40px;"> System.out.println("False"); <br></div></div>}<br></div> }</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5329_22674" name="resp5329_" type="radio" value="22674">        </td>
        <td class="c1 text ">
          <label for="resp5329_22674">
            <span class="anun">a<span class="anumsep">.</span></span> Compiler error at line 1            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5329_22675" name="resp5329_" type="radio" value="22675">        </td>
        <td class="c1 text ">
          <label for="resp5329_22675">
            <span class="anun">b<span class="anumsep">.</span></span> Compiler error at line 3            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5329_22676" name="resp5329_" type="radio" value="22676">        </td>
        <td class="c1 text ">
          <label for="resp5329_22676">
            <span class="anun">c<span class="anumsep">.</span></span> Prints "True"            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5329_22677" name="resp5329_" checked="checked" type="radio" value="22677">        </td>
        <td class="c1 text correct">
          <label for="resp5329_22677">
            <span class="anun">d<span class="anumsep">.</span></span> Prints "False"            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%208%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5330" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                8      </div>
      </div>
  <div class="content">
    <div class="qtext">
  Which of the following expressions will evaluate to true if preceded by the following code? Select two choices.<br><br> String a = new String("hello");<br> String b = new String(a);<br> String c = a;<br> char[] d = { 'h', 'e', 'l', 'l', 'o' };<br></div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose at least one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5330_22678" name="resp5330_22678" type="checkbox" value="22678">        </td>
        <td class="c1 text ">
          <label for="resp5330_22678">
            <span class="anun">a<span class="anumsep">.</span></span> (a == "hello")            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5330_22679" name="resp5330_22679" type="checkbox" value="22679">        </td>
        <td class="c1 text ">
          <label for="resp5330_22679">
            <span class="anun">b<span class="anumsep">.</span></span> (a == b)            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5330_22680" name="resp5330_22680" checked="checked" type="checkbox" value="22680">        </td>
        <td class="c1 text correct">
          <label for="resp5330_22680">
            <span class="anun">c<span class="anumsep">.</span></span> (a == c)            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5330_22681" name="resp5330_22681" checked="checked" type="checkbox" value="22681">        </td>
        <td class="c1 text correct">
          <label for="resp5330_22681">
            <span class="anun">d<span class="anumsep">.</span></span> a.equals(b)            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5330_22682" name="resp5330_22682" type="checkbox" value="22682">        </td>
        <td class="c1 text ">
          <label for="resp5330_22682">
            <span class="anun">e<span class="anumsep">.</span></span> a.equals(d)            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%209%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5331" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                9      </div>
      </div>
  <div class="content">
    <div class="qtext">
  What is the result of compiling and running the following program? <br><br>import java.util.Arrays; <br><br>class Split2<br>{<br>
<div style="margin-left: 40px;"> public static void main(String[] args)<br>{<br>
  <div style="margin-left: 40px;"> String str = "She sells sea shells";<br> System.out.println(Arrays.toString(str.split("\\s")));<br></div> }<br></div> }</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5331_22683" name="resp5331_" type="radio" value="22683">        </td>
        <td class="c1 text ">
          <label for="resp5331_22683">
            <span class="anun">a<span class="anumsep">.</span></span> Compiler error            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5331_22684" name="resp5331_" type="radio" value="22684">        </td>
        <td class="c1 text ">
          <label for="resp5331_22684">
            <span class="anun">b<span class="anumsep">.</span></span> An exception is thrown at runtime.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5331_22685" name="resp5331_" checked="checked" type="radio" value="22685">        </td>
        <td class="c1 text correct">
          <label for="resp5331_22685">
            <span class="anun">c<span class="anumsep">.</span></span> Prints [She, sells, sea, shells]            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5331_22686" name="resp5331_" type="radio" value="22686">        </td>
        <td class="c1 text ">
          <label for="resp5331_22686">
            <span class="anun">d<span class="anumsep">.</span></span> Prints [he, ells, ea, hells]            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5331_22687" name="resp5331_" type="radio" value="22687">        </td>
        <td class="c1 text ">
          <label for="resp5331_22687">
            <span class="anun">e<span class="anumsep">.</span></span> Prints []            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2010%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5332" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                10      </div>
      </div>
  <div class="content">
    <div class="qtext">
  What is printed when the following code is executed?<br><br>class PrintfTest<br>{ <br>
<div style="margin-left: 40px;">public static void main(String[] args)<br>{ <br>
  <div style="margin-left: 40px;">double val1 = 3.91;<br> double val2 = 3.97; <br>System.out.printf("%.1f %.1f",val1,val2);<br></div> }<br></div> }</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5332_22688" name="resp5332_" type="radio" value="22688">        </td>
        <td class="c1 text ">
          <label for="resp5332_22688">
            <span class="anun">a<span class="anumsep">.</span></span> 3.0 3.0            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5332_22689" name="resp5332_" type="radio" value="22689">        </td>
        <td class="c1 text correct">
          <label for="resp5332_22689">
            <span class="anun">b<span class="anumsep">.</span></span> 3.9 4.0            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_small.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5332_22690" name="resp5332_" checked="checked" type="radio" value="22690">        </td>
        <td class="c1 text ">
          <label for="resp5332_22690">
            <span class="anun">c<span class="anumsep">.</span></span> 3.9 3.9            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_big.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5332_22691" name="resp5332_" type="radio" value="22691">        </td>
        <td class="c1 text ">
          <label for="resp5332_22691">
            <span class="anun">d<span class="anumsep">.</span></span> 0.9 0.9            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2011%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q16275" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                11      </div>
      </div>
  <div class="content">
    <div class="qtext">
  What is the output when the following code is run.<br><br>ArrayList<string> a=new ArrayList<string>(); <br>a.add("1"); <br> a.add("2");<br>a.add("1"); <br>String[] s=a.toArray(new String[0]); <br>for(String str:s) System.out.print(str); </string></string></div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp16275_61868" name="resp16275_" type="radio" value="61868">        </td>
        <td class="c1 text ">
          <label for="resp16275_61868">
            <span class="anun">a<span class="anumsep">.</span></span> Compilation error.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp16275_61869" name="resp16275_" type="radio" value="61869">        </td>
        <td class="c1 text ">
          <label for="resp16275_61869">
            <span class="anun">b<span class="anumsep">.</span></span> Exception at runtime .            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp16275_61870" name="resp16275_" checked="checked" type="radio" value="61870">        </td>
        <td class="c1 text correct">
          <label for="resp16275_61870">
            <span class="anun">c<span class="anumsep">.</span></span> 121 .            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp16275_61871" name="resp16275_" type="radio" value="61871">        </td>
        <td class="c1 text ">
          <label for="resp16275_61871">
            <span class="anun">d<span class="anumsep">.</span></span> 1            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2012%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q16278" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                12      </div>
      </div>
  <div class="content">
    <div class="qtext">
  Choose the option which when inserted at #1 makes the code compile and run. <br><br>import java.util.*;<br><br>public class Sorter<br>{ <br>
<div style="margin-left: 40px;"> public static void main(String[] argv) <br></div>
<div style="margin-left: 40px;">{ <br></div>
<div style="margin-left: 40px;">
  <div style="margin-left: 40px;">ArrayList<string> aList = new ArrayList<string>(); </string></string><br><string><string>aList.add("USA"); </string></string><br><string><string>aList.add("Russia"); </string></string><br><string><string> aList.add("UK"); </string></string><br><string><string>#1 </string></string><br></div><string><string></string></string></div>
<div style="margin-left: 40px;"><string><string> } </string></string><br><string><string></string></string></div><string><string>} </string></string></div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp16278_61882" name="resp16278_" checked="checked" type="radio" value="61882">        </td>
        <td class="c1 text correct">
          <label for="resp16278_61882">
            <span class="anun">a<span class="anumsep">.</span></span> Collections.sort(aList);            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp16278_61883" name="resp16278_" type="radio" value="61883">        </td>
        <td class="c1 text ">
          <label for="resp16278_61883">
            <span class="anun">b<span class="anumsep">.</span></span> Collection.sort(aList);            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp16278_61884" name="resp16278_" type="radio" value="61884">        </td>
        <td class="c1 text ">
          <label for="resp16278_61884">
            <span class="anun">c<span class="anumsep">.</span></span> aList.sort();            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp16278_61885" name="resp16278_" type="radio" value="61885">        </td>
        <td class="c1 text ">
          <label for="resp16278_61885">
            <span class="anun">d<span class="anumsep">.</span></span> List.sort(aList);            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2013%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q16279" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                13      </div>
      </div>
  <div class="content">
    <div class="qtext">
  Choose the options which contain the correct mapping of collection type.</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose at least one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp16279_61886" name="resp16279_61886" type="checkbox" value="61886">        </td>
        <td class="c1 text correct">
          <label for="resp16279_61886">
            <span class="anun">a<span class="anumsep">.</span></span> A dictionary (TreeMap).            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_small.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp16279_61887" name="resp16279_61887" checked="checked" type="checkbox" value="61887">        </td>
        <td class="c1 text ">
          <label for="resp16279_61887">
            <span class="anun">b<span class="anumsep">.</span></span> A sorted collection of country names (HashSet).            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_big.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp16279_61888" name="resp16279_61888" checked="checked" type="checkbox" value="61888">        </td>
        <td class="c1 text correct">
          <label for="resp16279_61888">
            <span class="anun">c<span class="anumsep">.</span></span> An unsorted group of phone numbers (ArrayList).            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp16279_61889" name="resp16279_61889" checked="checked" type="checkbox" value="61889">        </td>
        <td class="c1 text correct">
          <label for="resp16279_61889">
            <span class="anun">d<span class="anumsep">.</span></span> An unsorted frequency table (HashMap).            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2014%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5334" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                14      </div>
      </div>
  <div class="content">
    <div class="qtext">
  What is the result of compiling and running the following code?<br> <br>ConcurrentSkipListSet&lt;String&gt; mySet = new ConcurrentSkipListSet&lt;String&gt;(); <br>mySet.add("me"); <br>mySet.add("you"); <br>mySet.add("your"); <br>mySet.add("they"); <br>mySet.add("she"); <br>NavigableSet&lt;String&gt; mySet1 = mySet.headSet("m"); <br>System.out.print(mySet1.size());</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5334_22696" name="resp5334_" type="radio" value="22696">        </td>
        <td class="c1 text ">
          <label for="resp5334_22696">
            <span class="anun">a<span class="anumsep">.</span></span> Prints 1            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5334_22697" name="resp5334_" checked="checked" type="radio" value="22697">        </td>
        <td class="c1 text correct">
          <label for="resp5334_22697">
            <span class="anun">b<span class="anumsep">.</span></span> Prints 0            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5334_22698" name="resp5334_" type="radio" value="22698">        </td>
        <td class="c1 text ">
          <label for="resp5334_22698">
            <span class="anun">c<span class="anumsep">.</span></span> Prints 4            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5334_22699" name="resp5334_" type="radio" value="22699">        </td>
        <td class="c1 text ">
          <label for="resp5334_22699">
            <span class="anun">d<span class="anumsep">.</span></span> Compiler error            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2015%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5336" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                15      </div>
      </div>
  <div class="content">
    <div class="qtext">
  Which of the following must be true for the following code? Select three choices.<br><br>StringBuffer s1=new StringBuffer("test"); <br>StringBuffer s2=s1; <br>StringBuffer s3=new StringBuffer("test");</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose at least one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5336_22704" name="resp5336_22704" checked="checked" type="checkbox" value="22704">        </td>
        <td class="c1 text correct">
          <label for="resp5336_22704">
            <span class="anun">a<span class="anumsep">.</span></span> s1.equals(s2)            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5336_22705" name="resp5336_22705" checked="checked" type="checkbox" value="22705">        </td>
        <td class="c1 text correct">
          <label for="resp5336_22705">
            <span class="anun">b<span class="anumsep">.</span></span> s2==s1            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5336_22706" name="resp5336_22706" checked="checked" type="checkbox" value="22706">        </td>
        <td class="c1 text correct">
          <label for="resp5336_22706">
            <span class="anun">c<span class="anumsep">.</span></span> s1.hashCode()==s2.hashCode()            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5336_22707" name="resp5336_22707" type="checkbox" value="22707">        </td>
        <td class="c1 text ">
          <label for="resp5336_22707">
            <span class="anun">d<span class="anumsep">.</span></span> s3==s1            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5336_22708" name="resp5336_22708" type="checkbox" value="22708">        </td>
        <td class="c1 text ">
          <label for="resp5336_22708">
            <span class="anun">e<span class="anumsep">.</span></span> s3.hashCode()!=s1.hashCode()            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2016%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5337" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                16      </div>
      </div>
  <div class="content">
    <div class="qtext">
  Which of the following statements are true? Select two choices.<br></div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose at least one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5337_22709" name="resp5337_22709" checked="checked" type="checkbox" value="22709">        </td>
        <td class="c1 text correct">
          <label for="resp5337_22709">
            <span class="anun">a<span class="anumsep">.</span></span> Just like classes, interfaces may also be generic.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5337_22710" name="resp5337_22710" type="checkbox" value="22710">        </td>
        <td class="c1 text correct">
          <label for="resp5337_22710">
            <span class="anun">b<span class="anumsep">.</span></span> Generic methods can be static or non-static.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_small.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5337_22711" name="resp5337_22711" checked="checked" type="checkbox" value="22711">        </td>
        <td class="c1 text ">
          <label for="resp5337_22711">
            <span class="anun">c<span class="anumsep">.</span></span> Only a generic class can have a generic constructor.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_big.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5337_22712" name="resp5337_22712" type="checkbox" value="22712">        </td>
        <td class="c1 text ">
          <label for="resp5337_22712">
            <span class="anun">d<span class="anumsep">.</span></span> Only a generic class can have a generic method.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2017%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5338" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                17      </div>
      </div>
  <div class="content">
    <div class="qtext">
  Which of these will compile and run? Select two choices.<br></div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose at least one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5338_22713" name="resp5338_22713" type="checkbox" value="22713">        </td>
        <td class="c1 text ">
          <label for="resp5338_22713">
            <span class="anun">a<span class="anumsep">.</span></span> LinkedList&lt;Integer&gt; l=new LinkedList&lt;int&gt;();            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5338_22714" name="resp5338_22714" checked="checked" type="checkbox" value="22714">        </td>
        <td class="c1 text correct">
          <label for="resp5338_22714">
            <span class="anun">b<span class="anumsep">.</span></span> List&lt;Number&gt; l=new LinkedList&lt;Number&gt;();            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5338_22715" name="resp5338_22715" checked="checked" type="checkbox" value="22715">        </td>
        <td class="c1 text correct">
          <label for="resp5338_22715">
            <span class="anun">c<span class="anumsep">.</span></span> LinkedList&lt;Integer&gt; l=new LinkedList ();            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5338_22716" name="resp5338_22716" type="checkbox" value="22716">        </td>
        <td class="c1 text ">
          <label for="resp5338_22716">
            <span class="anun">d<span class="anumsep">.</span></span> LinkedList&lt;Integer&gt; l=new &lt;Integer&gt;LinkedList();            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5338_22717" name="resp5338_22717" type="checkbox" value="22717">        </td>
        <td class="c1 text ">
          <label for="resp5338_22717">
            <span class="anun">e<span class="anumsep">.</span></span> List&lt;Number&gt; l=new LinkedList&lt;Integer&gt;();            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2018%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5339" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                18      </div>
      </div>
  <div class="content">
    <div class="qtext">
  Which of the following statements are true about a Map object? Select two choices.<br></div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose at least one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5339_22718" name="resp5339_22718" checked="checked" type="checkbox" value="22718">        </td>
        <td class="c1 text correct">
          <label for="resp5339_22718">
            <span class="anun">a<span class="anumsep">.</span></span> It cannot be assigned to a reference variable of type Collection.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5339_22719" name="resp5339_22719" type="checkbox" value="22719">        </td>
        <td class="c1 text ">
          <label for="resp5339_22719">
            <span class="anun">b<span class="anumsep">.</span></span> It maps unique keys to unique values.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5339_22720" name="resp5339_22720" checked="checked" type="checkbox" value="22720">        </td>
        <td class="c1 text correct">
          <label for="resp5339_22720">
            <span class="anun">c<span class="anumsep">.</span></span> It maps unique keys to non-unique values.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5339_22721" name="resp5339_22721" type="checkbox" value="22721">        </td>
        <td class="c1 text ">
          <label for="resp5339_22721">
            <span class="anun">d<span class="anumsep">.</span></span> It can be iterated using the MapIterator.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2019%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5340" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                19      </div>
      </div>
  <div class="content">
    <div class="qtext">
  Which of the following will occur if you add a duplicate element to a HashSet t?</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5340_22722" name="resp5340_" type="radio" value="22722">        </td>
        <td class="c1 text ">
          <label for="resp5340_22722">
            <span class="anun">a<span class="anumsep">.</span></span> The element gets added to t.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5340_22723" name="resp5340_" type="radio" value="22723">        </td>
        <td class="c1 text ">
          <label for="resp5340_22723">
            <span class="anun">b<span class="anumsep">.</span></span> An exception is thrown at runtime.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5340_22724" name="resp5340_" type="radio" value="22724">        </td>
        <td class="c1 text ">
          <label for="resp5340_22724">
            <span class="anun">c<span class="anumsep">.</span></span> The code causes compiler error.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5340_22725" name="resp5340_" checked="checked" type="radio" value="22725">        </td>
        <td class="c1 text correct">
          <label for="resp5340_22725">
            <span class="anun">d<span class="anumsep">.</span></span> The add() method returns false and the element is not added to t.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2020%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5341" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                20      </div>
      </div>
  <div class="content">
    <div class="qtext">
  Which of the following statements are true about the following code? <br><br>class Generics17<br>{<br>
<div style="margin-left: 40px;">public static void main(String[] args)<br>{<br>
  <div style="margin-left: 40px;"> List &lt;Object&gt; list=new LinkedList &lt;Object&gt;();<br> list.add("A");<br>addToList("B",list);<br> System.out.println(list);<br></div> }<br> static void addToList(Object o, List&lt;?&gt; l)<br>{ <br>
  <div style="margin-left: 40px;">l.add(o);<br></div> } <br></div>}<br></div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5341_22726" name="resp5341_" type="radio" value="22726">        </td>
        <td class="c1 text correct">
          <label for="resp5341_22726">
            <span class="anun">a<span class="anumsep">.</span></span> The code will compile if List&lt;?&gt; is replaced by List&lt;Object&gt;.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_small.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5341_22727" name="resp5341_" type="radio" value="22727">        </td>
        <td class="c1 text ">
          <label for="resp5341_22727">
            <span class="anun">b<span class="anumsep">.</span></span> The code will compile if List&lt;Object&gt; is replaced by List&lt;String&gt;.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5341_22728" name="resp5341_" type="radio" value="22728">        </td>
        <td class="c1 text ">
          <label for="resp5341_22728">
            <span class="anun">c<span class="anumsep">.</span></span> The code will compile if List&lt;Object&gt; is replaced by LinkedList&lt;Object&gt;.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5341_22729" name="resp5341_" checked="checked" type="radio" value="22729">        </td>
        <td class="c1 text ">
          <label for="resp5341_22729">
            <span class="anun">d<span class="anumsep">.</span></span> The code compiles fine.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_big.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2021%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5342" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                21      </div>
      </div>
  <div class="content">
    <div class="qtext">
  Which of the following methods are defined in the java.util.Arrays class? Select two choices.<br></div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose at least one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5342_22730" name="resp5342_22730" checked="checked" type="checkbox" value="22730">        </td>
        <td class="c1 text correct">
          <label for="resp5342_22730">
            <span class="anun">a<span class="anumsep">.</span></span> asList            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5342_22731" name="resp5342_22731" type="checkbox" value="22731">        </td>
        <td class="c1 text ">
          <label for="resp5342_22731">
            <span class="anun">b<span class="anumsep">.</span></span> toList            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5342_22732" name="resp5342_22732" type="checkbox" value="22732">        </td>
        <td class="c1 text ">
          <label for="resp5342_22732">
            <span class="anun">c<span class="anumsep">.</span></span> toArray            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5342_22733" name="resp5342_22733" type="checkbox" value="22733">        </td>
        <td class="c1 text ">
          <label for="resp5342_22733">
            <span class="anun">d<span class="anumsep">.</span></span> search            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5342_22734" name="resp5342_22734" checked="checked" type="checkbox" value="22734">        </td>
        <td class="c1 text correct">
          <label for="resp5342_22734">
            <span class="anun">e<span class="anumsep">.</span></span> sort            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2022%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5343" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                22      </div>
      </div>
  <div class="content">
    <div class="qtext">
  Which of the following is a valid declaration of a generic method?</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5343_22735" name="resp5343_" type="radio" value="22735">        </td>
        <td class="c1 text correct">
          <label for="resp5343_22735">
            <span class="anun">a<span class="anumsep">.</span></span> public static &lt;X , Y extends X&gt; boolean isPresent(X x, Y[] y){}            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_small.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5343_22736" name="resp5343_" type="radio" value="22736">        </td>
        <td class="c1 text ">
          <label for="resp5343_22736">
            <span class="anun">b<span class="anumsep">.</span></span> public &lt;X , Y extends X&gt; static boolean isPresent(X x, Y[] y){}            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5343_22737" name="resp5343_" type="radio" value="22737">        </td>
        <td class="c1 text ">
          <label for="resp5343_22737">
            <span class="anun">c<span class="anumsep">.</span></span> public static boolean &lt;X , Y extends X&gt; isPresent(X x, Y[] y){}            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5343_22738" name="resp5343_" checked="checked" type="radio" value="22738">        </td>
        <td class="c1 text ">
          <label for="resp5343_22738">
            <span class="anun">d<span class="anumsep">.</span></span> None of these            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_big.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2023%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q16280" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                23      </div>
      </div>
  <div class="content">
    <div class="qtext">
  Insert the correct option at #1 so that a separate thread is started which prints the string "running".<br><br> class MyRunnable implements Runnable <br>{ <br>
<div style="margin-left: 40px;"> public void run() <br></div>
<div style="margin-left: 40px;">{ <br></div>
<div style="margin-left: 80px;">System.out.println("running"); <br></div>
<div style="margin-left: 40px;">} <br></div>
<div style="margin-left: 40px;">public void start() <br></div>
<div style="margin-left: 40px;">{ <br></div>
<div style="margin-left: 80px;"> run(); <br></div>
<div style="margin-left: 40px;"> } <br></div> } <br><br>class ThreadTest <br>{ <br>
<div style="margin-left: 40px;"> public static void main(String[] args) <br></div>
<div style="margin-left: 40px;">{ <br></div>
<div style="margin-left: 80px;">#1 <br></div>
<div style="margin-left: 40px;">} <br></div>}</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp16280_61890" name="resp16280_" checked="checked" type="radio" value="61890">        </td>
        <td class="c1 text correct">
          <label for="resp16280_61890">
            <span class="anun">a<span class="anumsep">.</span></span> new Thread(new MyRunnable()).start();            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp16280_61891" name="resp16280_" type="radio" value="61891">        </td>
        <td class="c1 text ">
          <label for="resp16280_61891">
            <span class="anun">b<span class="anumsep">.</span></span> new Thread(new MyRunnable()).run();            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp16280_61892" name="resp16280_" type="radio" value="61892">        </td>
        <td class="c1 text ">
          <label for="resp16280_61892">
            <span class="anun">c<span class="anumsep">.</span></span> new MyRunnable().start();            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp16280_61893" name="resp16280_" type="radio" value="61893">        </td>
        <td class="c1 text ">
          <label for="resp16280_61893">
            <span class="anun">d<span class="anumsep">.</span></span> new MyRunnable().run();            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2024%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5346" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                24      </div>
      </div>
  <div class="content">
    <div class="qtext">
  What would be the result of an attempt to compile and run the following code?<br> <br>class SimpleThread extends Thread <br>{ <br>
<div style="margin-left: 40px;">public SimpleThread(String str) <br>{ <br>
  <div style="margin-left: 40px;">super(str); <br></div>}<br> public void run()<br> { <br>
  <div style="margin-left: 40px;">for (int i = 0; i &lt; 10; i++)<br> {<br>
    <div style="margin-left: 40px;"> System.out.println(i + " " + getName());<br> try <br>{ <br>
      <div style="margin-left: 40px;">sleep((long)(Math.random() * 1000));<br></div> } <br>catch (InterruptedException e) {} <br></div>} <br>System.out.println("DONE! " + getName());<br></div></div>
<div style="margin-left: 40px;"> }<br></div> }<br> public class TwoThreadsDemo<br>{ <br>
<div style="margin-left: 40px;">public static void main (String[] args) <br>{<br></div>
<div style="margin-left: 80px;"> new SimpleThread("Java Programmer").start(); // line A <br>new SimpleThread("Java Programmer").start(); // line B <br></div>
<div style="margin-left: 40px;">}<br></div> }<br></div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5346_22747" name="resp5346_" type="radio" value="22747">        </td>
        <td class="c1 text ">
          <label for="resp5346_22747">
            <span class="anun">a<span class="anumsep">.</span></span> It will not compile because SimpleThread is a subclass of thread, but does not have a no-argument public constructor.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5346_22748" name="resp5346_" type="radio" value="22748">        </td>
        <td class="c1 text ">
          <label for="resp5346_22748">
            <span class="anun">b<span class="anumsep">.</span></span> It will not compile because two separate threads in line A and line B have been given the same name "Java Programmer".            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5346_22749" name="resp5346_" type="radio" value="22749">        </td>
        <td class="c1 text ">
          <label for="resp5346_22749">
            <span class="anun">c<span class="anumsep">.</span></span> It will compile, but at runtime the second thread will overwrite the first thread and so the run method of the SimpleThread class will be executed only once instead of twice.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5346_22750" name="resp5346_" type="radio" value="22750">        </td>
        <td class="c1 text ">
          <label for="resp5346_22750">
            <span class="anun">d<span class="anumsep">.</span></span> It will compile but will throw RuntimeException.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5346_22751" name="resp5346_" checked="checked" type="radio" value="22751">        </td>
        <td class="c1 text correct">
          <label for="resp5346_22751">
            <span class="anun">e<span class="anumsep">.</span></span> It will compile and run with success and the run method of SimpleThread class will be executed twice by two separate threads created.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2025%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5347" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                25      </div>
      </div>
  <div class="content">
    <div class="qtext">
  What would be the result of an attempt to compile and run the following code? <br><br>public class OrderedThread <br>{<br>
<div style="margin-left: 40px;">public static void main(String[] args) <br>{<br>
  <div style="margin-left: 40px;"> MBThread first,second,third; <br>OrderedThread orderedThread = new OrderedThread();<br> first = new MBThread("One", orderedThread);<br> second = new MBThread("Two", orderedThread);<br> third = new MBThread("Three", orderedThread);<br> second.start(); // Line 1 <br>first.start(); // Line 2 <br>third.start(); // Line 3 <br></div>}<br> public void display(String msg) <br>{<br>
  <div style="margin-left: 40px;"> synchronized(msg) <br>{ <br>
    <div style="margin-left: 40px;">for(int i=1;i&lt;=20;i++)<br> { <br>
      <div style="margin-left: 40px;">System.out.println("Name= "+msg);<br></div> }<br></div> }<br></div> }<br></div> }<br><br>class MBThread extends Thread <br>{<br>
<div style="margin-left: 40px;"> String name;<br> OrderedThread orderT;<br> MBThread(String name, OrderedThread orderT)<br> {<br></div>
<div style="margin-left: 80px;"> this.name = name;<br> this.orderT = orderT;<br></div>
<div style="margin-left: 40px;"> }<br> public void run() <br>{<br>
  <div style="margin-left: 40px;"> orderT.display(name);<br></div> }<br></div> }</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5347_22752" name="resp5347_" type="radio" value="22752">        </td>
        <td class="c1 text ">
          <label for="resp5347_22752">
            <span class="anun">a<span class="anumsep">.</span></span> The code compiles fine and prints Two, One, and Three in order and repeats the same for another 19 times.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5347_22753" name="resp5347_" checked="checked" type="radio" value="22753">        </td>
        <td class="c1 text ">
          <label for="resp5347_22753">
            <span class="anun">b<span class="anumsep">.</span></span> The code compiles fine and prints Two 20 times, One 20 times, and Three 20 times sequentially. However, the order whether Two will come first, then One, and at last Three is not guaranteed.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_big.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5347_22754" name="resp5347_" type="radio" value="22754">        </td>
        <td class="c1 text ">
          <label for="resp5347_22754">
            <span class="anun">c<span class="anumsep">.</span></span> The code compiles fine and prints Two 20 times, One 20 times, and Three 20 times sequentially and the behavior is guaranteed.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5347_22755" name="resp5347_" type="radio" value="22755">        </td>
        <td class="c1 text correct">
          <label for="resp5347_22755">
            <span class="anun">d<span class="anumsep">.</span></span> The code compiles fine and prints Two, One, and Three 20 times each in an indefinite order.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_small.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5347_22756" name="resp5347_" type="radio" value="22756">        </td>
        <td class="c1 text ">
          <label for="resp5347_22756">
            <span class="anun">e<span class="anumsep">.</span></span> The code compiles fine but throws InterruptedException due to synchronization of msg String in a wrong way.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2026%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5348" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                26      </div>
      </div>
  <div class="content">
    <div class="qtext">
  Which of the following statements are true about the sleep method of Thread class? Select two choices.<br></div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose at least one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5348_22757" name="resp5348_22757" type="checkbox" value="22757">        </td>
        <td class="c1 text ">
          <label for="resp5348_22757">
            <span class="anun">a<span class="anumsep">.</span></span> A thread releases any locks it is holding when it is invoked on the thread.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5348_22758" name="resp5348_22758" checked="checked" type="checkbox" value="22758">        </td>
        <td class="c1 text correct">
          <label for="resp5348_22758">
            <span class="anun">b<span class="anumsep">.</span></span> It is defined as static within the Thread class.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5348_22759" name="resp5348_22759" type="checkbox" value="22759">        </td>
        <td class="c1 text ">
          <label for="resp5348_22759">
            <span class="anun">c<span class="anumsep">.</span></span> A thread starts running as soon as it wakes up from the sleeping state.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5348_22760" name="resp5348_22760" checked="checked" type="checkbox" value="22760">        </td>
        <td class="c1 text correct">
          <label for="resp5348_22760">
            <span class="anun">d<span class="anumsep">.</span></span> The sleep method throws InterruptedException.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2027%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5349" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                27      </div>
      </div>
  <div class="content">
    <div class="qtext">
  Which of the following statements are true about synchronization? Select two choices.<br></div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose at least one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5349_22761" name="resp5349_22761" type="checkbox" value="22761">        </td>
        <td class="c1 text ">
          <label for="resp5349_22761">
            <span class="anun">a<span class="anumsep">.</span></span> Static methods cannot be synchronized.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5349_22762" name="resp5349_22762" type="checkbox" value="22762">        </td>
        <td class="c1 text ">
          <label for="resp5349_22762">
            <span class="anun">b<span class="anumsep">.</span></span> Synchronized methods cannot make calls to non-synchronized methods.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5349_22763" name="resp5349_22763" checked="checked" type="checkbox" value="22763">        </td>
        <td class="c1 text correct">
          <label for="resp5349_22763">
            <span class="anun">c<span class="anumsep">.</span></span> A synchronized method can be overridden to be non-synchronized and vice versa.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5349_22764" name="resp5349_22764" checked="checked" type="checkbox" value="22764">        </td>
        <td class="c1 text correct">
          <label for="resp5349_22764">
            <span class="anun">d<span class="anumsep">.</span></span> When a thread is executing a synchronized method, other threads can freely access non-synchronized methods of the same object.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2028%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q16281" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                28      </div>
      </div>
  <div class="content">
    <div class="qtext">
  What is the output when the following code is run. <br><br>public static void main(String[] args) <br>{ <br>
<div style="margin-left: 40px;"> callMe(new char[] {'A','B','C','D'} ); <br></div> } <br>static void callMe(char... c) <br>{ <br>
<div style="margin-left: 40px;"> for(char ch : c) <br></div>
<div style="margin-left: 40px;">System.out.println(ch); <br></div> }</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp16281_61894" name="resp16281_" type="radio" value="61894">        </td>
        <td class="c1 text ">
          <label for="resp16281_61894">
            <span class="anun">a<span class="anumsep">.</span></span> Compilation error.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp16281_61895" name="resp16281_" type="radio" value="61895">        </td>
        <td class="c1 text correct">
          <label for="resp16281_61895">
            <span class="anun">b<span class="anumsep">.</span></span> D            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_small.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp16281_61896" name="resp16281_" type="radio" value="61896">        </td>
        <td class="c1 text ">
          <label for="resp16281_61896">
            <span class="anun">c<span class="anumsep">.</span></span> Exception at runtime.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp16281_61897" name="resp16281_" checked="checked" type="radio" value="61897">        </td>
        <td class="c1 text ">
          <label for="resp16281_61897">
            <span class="anun">d<span class="anumsep">.</span></span> ABCD.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_big.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2029%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q16282" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                29      </div>
      </div>
  <div class="content">
    <div class="qtext">
  Choose the options that have correct Exception description.<br>(Choose three options)<br></div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose at least one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp16282_61898" name="resp16282_61898" checked="checked" type="checkbox" value="61898">        </td>
        <td class="c1 text correct">
          <label for="resp16282_61898">
            <span class="anun">a<span class="anumsep">.</span></span> ArithmeticException : Thrown when an integer is divided by zero.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp16282_61899" name="resp16282_61899" checked="checked" type="checkbox" value="61899">        </td>
        <td class="c1 text correct">
          <label for="resp16282_61899">
            <span class="anun">b<span class="anumsep">.</span></span> OutOfMemoryError : Thrown when the JVM is out of memory when trying to allocate an object .            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp16282_61900" name="resp16282_61900" type="checkbox" value="61900">        </td>
        <td class="c1 text ">
          <label for="resp16282_61900">
            <span class="anun">c<span class="anumsep">.</span></span> : OutOfMemoryException : Thrown when the JVM is out of memory when trying to allocate an object .            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp16282_61901" name="resp16282_61901" type="checkbox" value="61901">        </td>
        <td class="c1 text correct">
          <label for="resp16282_61901">
            <span class="anun">d<span class="anumsep">.</span></span> : ClassCastException : Thrown when an attempt is made to cast an object to a subclass of which it is not an instance.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_small.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp16282_61902" name="resp16282_61902" type="checkbox" value="61902">        </td>
        <td class="c1 text ">
          <label for="resp16282_61902">
            <span class="anun">e<span class="anumsep">.</span></span> IllegalArgumentException : Thrown when an attempt is made to access an array element by specifying a negative index.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2030%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5352" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                30      </div>
      </div>
  <div class="content">
    <div class="qtext">
  Which method declarations, when inserted independently at the indicated position, will not cause the program to fail during compilation? Select two choices.<br><br> public class Test <br>{<br>
<div style="margin-left: 40px;"> public long sum(long a, long b) <br>{<br>
  <div style="margin-left: 40px;"> return a + b; <br></div>} <br>// Insert new method declaration here. <br></div>}</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose at least one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5352_22774" name="resp5352_22774" checked="checked" type="checkbox" value="22774">        </td>
        <td class="c1 text correct">
          <label for="resp5352_22774">
            <span class="anun">a<span class="anumsep">.</span></span> public int sum(int a, int b) { return a + b; }            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5352_22775" name="resp5352_22775" checked="checked" type="checkbox" value="22775">        </td>
        <td class="c1 text ">
          <label for="resp5352_22775">
            <span class="anun">b<span class="anumsep">.</span></span> public int sum(long a, long b) { return a+b; }            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_big.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5352_22776" name="resp5352_22776" type="checkbox" value="22776">        </td>
        <td class="c1 text ">
          <label for="resp5352_22776">
            <span class="anun">c<span class="anumsep">.</span></span> abstract int sum();            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5352_22777" name="resp5352_22777" type="checkbox" value="22777">        </td>
        <td class="c1 text ">
          <label for="resp5352_22777">
            <span class="anun">d<span class="anumsep">.</span></span> private static long sum(long a, long b) { return a + b; }            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5352_22778" name="resp5352_22778" type="checkbox" value="22778">        </td>
        <td class="c1 text correct">
          <label for="resp5352_22778">
            <span class="anun">e<span class="anumsep">.</span></span> public long sum(long a, int b) { return a + b; }            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_small.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2031%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5353" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                31      </div>
      </div>
  <div class="content">
    <div class="qtext">
  Which of the following are legal identifiers for variable names?</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5353_22779" name="resp5353_" type="radio" value="22779">        </td>
        <td class="c1 text correct">
          <label for="resp5353_22779">
            <span class="anun">a<span class="anumsep">.</span></span> instanceOf            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_small.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5353_22780" name="resp5353_" checked="checked" type="radio" value="22780">        </td>
        <td class="c1 text ">
          <label for="resp5353_22780">
            <span class="anun">b<span class="anumsep">.</span></span> 3_$int            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_big.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5353_22781" name="resp5353_" type="radio" value="22781">        </td>
        <td class="c1 text ">
          <label for="resp5353_22781">
            <span class="anun">c<span class="anumsep">.</span></span> -int            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5353_22782" name="resp5353_" type="radio" value="22782">        </td>
        <td class="c1 text ">
          <label for="resp5353_22782">
            <span class="anun">d<span class="anumsep">.</span></span> !byte            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5353_22783" name="resp5353_" type="radio" value="22783">        </td>
        <td class="c1 text ">
          <label for="resp5353_22783">
            <span class="anun">e<span class="anumsep">.</span></span> volatile            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2032%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5354" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                32      </div>
      </div>
  <div class="content">
    <div class="qtext">
  What will happen when you compile and run the following code? <br><br>public class MyClass <br>{ <br>
<div style="margin-left: 40px;">private static int x = getValue();<br> private static int y = 5;<br> private static int getValue()<br> { <br>
  <div style="margin-left: 40px;">return y;<br></div> }<br> public static void main(String[] args)<br> { <br>
  <div style="margin-left: 40px;">System.out.println(x);<br></div> }<br></div> }</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5354_22784" name="resp5354_" type="radio" value="22784">        </td>
        <td class="c1 text ">
          <label for="resp5354_22784">
            <span class="anun">a<span class="anumsep">.</span></span> Compiler error about access restriction of private variables of MyClass            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5354_22785" name="resp5354_" checked="checked" type="radio" value="22785">        </td>
        <td class="c1 text ">
          <label for="resp5354_22785">
            <span class="anun">b<span class="anumsep">.</span></span> Compiler error about forward referencing of the getValue() method            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_big.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5354_22786" name="resp5354_" type="radio" value="22786">        </td>
        <td class="c1 text correct">
          <label for="resp5354_22786">
            <span class="anun">c<span class="anumsep">.</span></span> Prints 0            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_small.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5354_22787" name="resp5354_" type="radio" value="22787">        </td>
        <td class="c1 text ">
          <label for="resp5354_22787">
            <span class="anun">d<span class="anumsep">.</span></span> Compiler error about forward referencing of the y static field            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5354_22788" name="resp5354_" type="radio" value="22788">        </td>
        <td class="c1 text ">
          <label for="resp5354_22788">
            <span class="anun">e<span class="anumsep">.</span></span> Prints 10            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2033%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5355" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                33      </div>
      </div>
  <div class="content">
    <div class="qtext">
  What is the result of compiling and running the following program?<br><br> enum Fish <br>{<br>
<div style="margin-left: 40px;"> GOLDFISH, ANGELFISH, GUPPY; <br></div>}<br> public class EnumTest2<br>{ <br>
<div style="margin-left: 40px;">public static void main(String[] args)<br>{<br>
  <div style="margin-left: 40px;"> Fish f=Fish.valueOf("GUPPY"); <br>if(f==Fish.GUPPY) <br>
    <div style="margin-left: 40px;">System.out.println("Are equal");<br></div> if(f.equals(Fish.GUPPY)) <br>
    <div style="margin-left: 40px;">System.out.println("Are equal");<br></div></div> }<br></div> }</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5355_22789" name="resp5355_" type="radio" value="22789">        </td>
        <td class="c1 text ">
          <label for="resp5355_22789">
            <span class="anun">a<span class="anumsep">.</span></span> Compiler error            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5355_22790" name="resp5355_" checked="checked" type="radio" value="22790">        </td>
        <td class="c1 text correct">
          <label for="resp5355_22790">
            <span class="anun">b<span class="anumsep">.</span></span> Prints "Are equal" twice            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5355_22791" name="resp5355_" type="radio" value="22791">        </td>
        <td class="c1 text ">
          <label for="resp5355_22791">
            <span class="anun">c<span class="anumsep">.</span></span> Prints "Are equal" once            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5355_22792" name="resp5355_" type="radio" value="22792">        </td>
        <td class="c1 text ">
          <label for="resp5355_22792">
            <span class="anun">d<span class="anumsep">.</span></span> Prints nothing            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2034%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5356" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                34      </div>
      </div>
  <div class="content">
    <div class="qtext">
  What is the result of compiling and executing the following code ? <br><br>class MyBoolean <br>{ <br>
<div style="margin-left: 40px;">Boolean[] bool = new Boolean[5];<br> <br>public static void main(String[] args) <br>{ <br>
  <div style="margin-left: 40px;">new MyBoolean().myMethod();<br></div> }<br> <br>public void myMethod()<br> { <br>
  <div style="margin-left: 40px;">if(bool[1]==true) <br>{<br>
    <div style="margin-left: 40px;"> System.out.println("It's true");<br></div> }<br> else <br>{ <br>
    <div style="margin-left: 40px;">System.out.println("It's false");<br></div></div>
  <div style="margin-left: 40px;"> }<br></div> }<br></div> }</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5356_22793" name="resp5356_" type="radio" value="22793">        </td>
        <td class="c1 text ">
          <label for="resp5356_22793">
            <span class="anun">a<span class="anumsep">.</span></span> Prints: "It's true"            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5356_22794" name="resp5356_" type="radio" value="22794">        </td>
        <td class="c1 text ">
          <label for="resp5356_22794">
            <span class="anun">b<span class="anumsep">.</span></span> Prints: "It's false"            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5356_22795" name="resp5356_" type="radio" value="22795">        </td>
        <td class="c1 text ">
          <label for="resp5356_22795">
            <span class="anun">c<span class="anumsep">.</span></span> Compile time error            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5356_22796" name="resp5356_" checked="checked" type="radio" value="22796">        </td>
        <td class="c1 text correct">
          <label for="resp5356_22796">
            <span class="anun">d<span class="anumsep">.</span></span> Exception            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5356_22797" name="resp5356_" type="radio" value="22797">        </td>
        <td class="c1 text ">
          <label for="resp5356_22797">
            <span class="anun">e<span class="anumsep">.</span></span> None of the above            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2035%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5357" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                35      </div>
      </div>
  <div class="content">
    <div class="qtext">
  What happens when you try to compile and run the following program? <br>1. class Mystery<br> 2. { <br>3. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;String s; <br>4. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public static void main(String[] args) <br>5. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br>6. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Mystery m = new Mystery(); <br>7. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;m.go(); <br>8. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br>9. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;void Mystery() <br>10.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br>11. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s = "Constructor"; <br>12. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br>13. <br>14. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;void go() <br>15. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{<br> 16. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println(s); <br>17. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br>18. }</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5357_22798" name="resp5357_" type="radio" value="22798">        </td>
        <td class="c1 text ">
          <label for="resp5357_22798">
            <span class="anun">a<span class="anumsep">.</span></span> The code does not compile.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5357_22799" name="resp5357_" type="radio" value="22799">        </td>
        <td class="c1 text ">
          <label for="resp5357_22799">
            <span class="anun">b<span class="anumsep">.</span></span> The code runs but nothing appears in the standard output.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5357_22800" name="resp5357_" type="radio" value="22800">        </td>
        <td class="c1 text ">
          <label for="resp5357_22800">
            <span class="anun">c<span class="anumsep">.</span></span> The code runs and "Constructor" appears in the standard output.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5357_22801" name="resp5357_" checked="checked" type="radio" value="22801">        </td>
        <td class="c1 text correct">
          <label for="resp5357_22801">
            <span class="anun">d<span class="anumsep">.</span></span> The code runs and writes "null" in the standard output.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2036%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5358" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                36      </div>
      </div>
  <div class="content">
    <div class="qtext">
  What will be the result of compiling and running the following code? <br><br>class TestInner <br>{<br>
<div style="margin-left: 40px;"> int i=10; //1<br></div> <br>
<div style="margin-left: 40px;">TestInner() <br>{<br></div>
<div style="margin-left: 80px;"> System.out.print("Outer"); // 2 <br></div>
<div style="margin-left: 40px;">}<br><br>static class MyInner <br>{<br></div>
<div style="margin-left: 80px;"> MyInner()<br>{<br>
  <div style="margin-left: 40px;"> System.out.print(i); //3 <br></div>} <br></div>
<div style="margin-left: 40px;">}<br></div>
<div style="margin-left: 40px;"> public static void main(String[] args) { //4<br>
  <div style="margin-left: 40px;"> new TestInner.MyInner(); //5 <br></div>}<br></div> }</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5358_22802" name="resp5358_" type="radio" value="22802">        </td>
        <td class="c1 text correct">
          <label for="resp5358_22802">
            <span class="anun">a<span class="anumsep">.</span></span> Compilation fails at line 3            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_small.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5358_22803" name="resp5358_" type="radio" value="22803">        </td>
        <td class="c1 text ">
          <label for="resp5358_22803">
            <span class="anun">b<span class="anumsep">.</span></span> Compilation fails at line 5            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5358_22804" name="resp5358_" type="radio" value="22804">        </td>
        <td class="c1 text ">
          <label for="resp5358_22804">
            <span class="anun">c<span class="anumsep">.</span></span> Prints "Outer10"            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5358_22805" name="resp5358_" checked="checked" type="radio" value="22805">        </td>
        <td class="c1 text ">
          <label for="resp5358_22805">
            <span class="anun">d<span class="anumsep">.</span></span> None of the above            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_big.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2037%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5359" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                37      </div>
      </div>
  <div class="content">
    <div class="qtext">
  Which of the following statements is/are true about compiling and running the following code? <br><br>class Test <br>{ <br>
<div style="margin-left: 40px;">final Object obj; <br><br>Test() <br>{<br>
  <div style="margin-left: 40px;"> obj=null; //1 <br>System.out.println(obj instanceof Object); //2<br> Integer i=new Integer("1"); //3 <br>obj=i; //4 <br></div>}<br> <br>public static void main(String args[])<br> {<br>
  <div style="margin-left: 40px;"> Test test=new Test();<br>System.out.println(test.obj); <br></div>}<br></div> }</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5359_22806" name="resp5359_" type="radio" value="22806">        </td>
        <td class="c1 text ">
          <label for="resp5359_22806">
            <span class="anun">a<span class="anumsep">.</span></span> The program compiles correctly and prints "false" and null.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5359_22807" name="resp5359_" type="radio" value="22807">        </td>
        <td class="c1 text ">
          <label for="resp5359_22807">
            <span class="anun">b<span class="anumsep">.</span></span> The program will compile correctly if line 1 is removed.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5359_22808" name="resp5359_" type="radio" value="22808">        </td>
        <td class="c1 text ">
          <label for="resp5359_22808">
            <span class="anun">c<span class="anumsep">.</span></span> The program will compile correctly if line 2 is removed.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5359_22809" name="resp5359_" type="radio" value="22809">        </td>
        <td class="c1 text ">
          <label for="resp5359_22809">
            <span class="anun">d<span class="anumsep">.</span></span> The program will compile correctly if line 3 is removed.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5359_22810" name="resp5359_" checked="checked" type="radio" value="22810">        </td>
        <td class="c1 text correct">
          <label for="resp5359_22810">
            <span class="anun">e<span class="anumsep">.</span></span> The program will compile correctly if line 4 is removed.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5359_22811" name="resp5359_" type="radio" value="22811">        </td>
        <td class="c1 text ">
          <label for="resp5359_22811">
            <span class="anun">f<span class="anumsep">.</span></span> None of the above.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2038%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5362" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                38      </div>
      </div>
  <div class="content">
    <div class="qtext">
  Exception1 and Exception2 are subclasses of Exception. <br><br>Exception3 is the subclass of RuntimeException. Given the following classes, which of these exceptions can be thrown by the test() method in class A3? <br><br>class A1 <br>{ <br>
<div style="margin-left: 40px;">void test() throws Exception1, Exception2{}<br></div> }<br> <br>class A2 extends A1<br>{<br>
<div style="margin-left: 40px;"> void test() throws Exception2{}<br></div>}<br>
<div style="margin-left: 40px;"><br></div> class A3 extends A2<br>{<br>
<div style="margin-left: 40px;"> void test() throws _______{} <br></div>}<br></div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5362_22821" name="resp5362_" type="radio" value="22821">        </td>
        <td class="c1 text ">
          <label for="resp5362_22821">
            <span class="anun">a<span class="anumsep">.</span></span> Exception1, Exception2, and RuntimeException            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5362_22822" name="resp5362_" type="radio" value="22822">        </td>
        <td class="c1 text ">
          <label for="resp5362_22822">
            <span class="anun">b<span class="anumsep">.</span></span> Exception1 and Exception2 only            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5362_22823" name="resp5362_" checked="checked" type="radio" value="22823">        </td>
        <td class="c1 text correct">
          <label for="resp5362_22823">
            <span class="anun">c<span class="anumsep">.</span></span> Exception2 and RuntimeException only            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5362_22824" name="resp5362_" type="radio" value="22824">        </td>
        <td class="c1 text ">
          <label for="resp5362_22824">
            <span class="anun">d<span class="anumsep">.</span></span> It cannot throw any exceptions            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5362_58138" name="resp5362_" type="radio" value="58138">        </td>
        <td class="c1 text ">
          <label for="resp5362_58138">
            <span class="anun">e<span class="anumsep">.</span></span> RuntimeException only            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2039%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5363" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                39      </div>
      </div>
  <div class="content">
    <div class="qtext">
  What will appear in the standard output if tryThis() throws an IOException? <br>1. try <br>2. { <br>3. tryThis(); <br>4. return; <br>5. } <br>6. catch(IOException x1) <br>7. { <br>8. System.out.println("exception 1"); <br>9. return; <br>10. } <br>11. catch(Exception x2) <br>12. { <br>13. System.out.println("exception 2"); <br>14. return; <br>15. } <br>16. finally <br>17. { <br>18. System.out.println("finally"); <br>19. }</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5363_22825" name="resp5363_" checked="checked" type="radio" value="22825">        </td>
        <td class="c1 text correct">
          <label for="resp5363_22825">
            <span class="anun">a<span class="anumsep">.</span></span> "exception 1" followed by "finally"            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5363_22826" name="resp5363_" type="radio" value="22826">        </td>
        <td class="c1 text ">
          <label for="resp5363_22826">
            <span class="anun">b<span class="anumsep">.</span></span> "exception 2" followed by "finally"            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5363_22827" name="resp5363_" type="radio" value="22827">        </td>
        <td class="c1 text ">
          <label for="resp5363_22827">
            <span class="anun">c<span class="anumsep">.</span></span> "exception 1"            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5363_22828" name="resp5363_" type="radio" value="22828">        </td>
        <td class="c1 text ">
          <label for="resp5363_22828">
            <span class="anun">d<span class="anumsep">.</span></span> "exception 2"            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2040%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5364" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                40      </div>
      </div>
  <div class="content">
    <div class="qtext">
  Which of the following code fragments can you insert at the specified location in the given code so that it continues with the next iteration of the outermost loop? <br><br>outer: for ( int x = 0; x &lt; 3; x++ ) <br>{ <br>
<div style="margin-left: 40px;">middle: for ( int y = 0; y &lt; 3; y++ ) <br>{ <br>
  <div style="margin-left: 40px;">inner: for ( int z = 0; z &lt; 3; z++ ) <br>{<br>
    <div style="margin-left: 40px;"> if ( y == 1) <br>{ <br>
      <div style="margin-left: 40px;">// insert here <br></div></div>
    <div style="margin-left: 40px;">}<br></div> }<br></div> }<br></div> }</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5364_22829" name="resp5364_" type="radio" value="22829">        </td>
        <td class="c1 text ">
          <label for="resp5364_22829">
            <span class="anun">a<span class="anumsep">.</span></span> break;            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5364_22830" name="resp5364_" checked="checked" type="radio" value="22830">        </td>
        <td class="c1 text correct">
          <label for="resp5364_22830">
            <span class="anun">b<span class="anumsep">.</span></span> break middle;            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5364_22831" name="resp5364_" type="radio" value="22831">        </td>
        <td class="c1 text ">
          <label for="resp5364_22831">
            <span class="anun">c<span class="anumsep">.</span></span> break outer;            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5364_22832" name="resp5364_" type="radio" value="22832">        </td>
        <td class="c1 text ">
          <label for="resp5364_22832">
            <span class="anun">d<span class="anumsep">.</span></span> continue;            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5364_22833" name="resp5364_" type="radio" value="22833">        </td>
        <td class="c1 text ">
          <label for="resp5364_22833">
            <span class="anun">e<span class="anumsep">.</span></span> continue middle;            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2041%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5365" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                41      </div>
      </div>
  <div class="content">
    <div class="qtext">
  The AssertionError class has the "-IS-A" relationship with which of the following classes? Select two choices.<br></div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose at least one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5365_22834" name="resp5365_22834" type="checkbox" value="22834">        </td>
        <td class="c1 text ">
          <label for="resp5365_22834">
            <span class="anun">a<span class="anumsep">.</span></span> RuntimeException            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5365_22835" name="resp5365_22835" type="checkbox" value="22835">        </td>
        <td class="c1 text correct">
          <label for="resp5365_22835">
            <span class="anun">b<span class="anumsep">.</span></span> Error            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_small.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5365_22836" name="resp5365_22836" type="checkbox" value="22836">        </td>
        <td class="c1 text ">
          <label for="resp5365_22836">
            <span class="anun">c<span class="anumsep">.</span></span> VirtualMachineError            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5365_22837" name="resp5365_22837" type="checkbox" value="22837">        </td>
        <td class="c1 text ">
          <label for="resp5365_22837">
            <span class="anun">d<span class="anumsep">.</span></span> IllegalAccessException            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5365_22838" name="resp5365_22838" checked="checked" type="checkbox" value="22838">        </td>
        <td class="c1 text correct">
          <label for="resp5365_22838">
            <span class="anun">e<span class="anumsep">.</span></span> Throwable            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2042%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5366" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                42      </div>
      </div>
  <div class="content">
    <div class="qtext">
  What will happen when you attempt to compile and run the following code? (Assume that the code is compiled and run with assertions enabled.)<br><br> public class AssertTest <br>{<br>
<div style="margin-left: 40px;"> private void methodA(int i) <br>{ <br>
  <div style="margin-left: 40px;">assert i &gt;= 0 : methodB();<br> System.out.println(i);<br></div> } <br><br>private String methodB() <br>{ <br>
  <div style="margin-left: 40px;">return "The value must not be negative";<br></div> } <br><br>public static void main(String[] args)<br> { <br>
  <div style="margin-left: 40px;">AssertTest test = new AssertTest(); <br>test.methodA(-10); <br></div>}<br></div> }</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5366_22839" name="resp5366_" type="radio" value="22839">        </td>
        <td class="c1 text ">
          <label for="resp5366_22839">
            <span class="anun">a<span class="anumsep">.</span></span> It will print -10.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5366_22840" name="resp5366_" checked="checked" type="radio" value="22840">        </td>
        <td class="c1 text correct">
          <label for="resp5366_22840">
            <span class="anun">b<span class="anumsep">.</span></span> It will result in AssertionError with the message -"The value must not be negative".            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5366_22841" name="resp5366_" type="radio" value="22841">        </td>
        <td class="c1 text ">
          <label for="resp5366_22841">
            <span class="anun">c<span class="anumsep">.</span></span> The code will not compile.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5366_22842" name="resp5366_" type="radio" value="22842">        </td>
        <td class="c1 text ">
          <label for="resp5366_22842">
            <span class="anun">d<span class="anumsep">.</span></span> None of these            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2043%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5367" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                43      </div>
      </div>
  <div class="content">
    <div class="qtext">
  The AssertTest class defines a method, methodA(int i), as given below. Which of the following declarations of methodA(int i) would be valid in a subclass of AssertTest? <br>(Assume that the code is compiled successfully and runs with assertions enabled.) Select three choices.<br><br>public class AssertTest <br>{<br>
<div style="margin-left: 40px;"> public void methodA(int i) throws AssertionError <br>{<br>
  <div style="margin-left: 40px;"> assert i &lt; 1024 : "Invalid Value";<br></div> }<br></div> }<br></div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose at least one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5367_22843" name="resp5367_22843" checked="checked" type="checkbox" value="22843">        </td>
        <td class="c1 text correct">
          <label for="resp5367_22843">
            <span class="anun">a<span class="anumsep">.</span></span> public void methodA(int i)            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5367_22844" name="resp5367_22844" type="checkbox" value="22844">        </td>
        <td class="c1 text ">
          <label for="resp5367_22844">
            <span class="anun">b<span class="anumsep">.</span></span> public void methodA(int i) throws Exception            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5367_22845" name="resp5367_22845" type="checkbox" value="22845">        </td>
        <td class="c1 text ">
          <label for="resp5367_22845">
            <span class="anun">c<span class="anumsep">.</span></span> public void methodA(int i) throws Throwable            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5367_22846" name="resp5367_22846" checked="checked" type="checkbox" value="22846">        </td>
        <td class="c1 text correct">
          <label for="resp5367_22846">
            <span class="anun">d<span class="anumsep">.</span></span> public void methodA(int i) throws Error            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5367_22847" name="resp5367_22847" checked="checked" type="checkbox" value="22847">        </td>
        <td class="c1 text correct">
          <label for="resp5367_22847">
            <span class="anun">e<span class="anumsep">.</span></span> public void methodA(int i) throws RuntimeException            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5367_58139" name="resp5367_58139" type="checkbox" value="58139">        </td>
        <td class="c1 text ">
          <label for="resp5367_58139">
            <span class="anun">f<span class="anumsep">.</span></span> Only option A is valid            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2044%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5368" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                44      </div>
      </div>
  <div class="content">
    <div class="qtext">
  What will happen when you attempt to compile and run the following code? (Assume that the code is compiled and run with assertions enabled.)<br><br> 1. public class AssertTest <br>2. { <br>3. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int LOCAL_RATE = 12; <br>4. <br>5. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;private void computeAmount(int rate) <br>6. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br>7. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;assert rate = LOCAL_RATE : "Invalid rate"; <br>8. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int amount = 10000; <br>9. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;int total = amount + (amount * rate/100); <br>10.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.out.println("Total = " + total); <br>11. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br>12. <br>13. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public static void main(String[] args) <br>14. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{ <br>15. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;AssertTest test = new AssertTest(); <br>16. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;test.computeAmount(12); <br>17. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} <br>18. }</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5368_22848" name="resp5368_" checked="checked" type="radio" value="22848">        </td>
        <td class="c1 text ">
          <label for="resp5368_22848">
            <span class="anun">a<span class="anumsep">.</span></span> It will print-"Total = 11200"            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_big.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5368_22849" name="resp5368_" type="radio" value="22849">        </td>
        <td class="c1 text ">
          <label for="resp5368_22849">
            <span class="anun">b<span class="anumsep">.</span></span> Compilation error at line 16            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5368_22850" name="resp5368_" type="radio" value="22850">        </td>
        <td class="c1 text correct">
          <label for="resp5368_22850">
            <span class="anun">c<span class="anumsep">.</span></span> Compilation error at line 7            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_small.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5368_22851" name="resp5368_" type="radio" value="22851">        </td>
        <td class="c1 text ">
          <label for="resp5368_22851">
            <span class="anun">d<span class="anumsep">.</span></span> Compilation error at line 5            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5368_22852" name="resp5368_" type="radio" value="22852">        </td>
        <td class="c1 text ">
          <label for="resp5368_22852">
            <span class="anun">e<span class="anumsep">.</span></span> None of these            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2045%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5369" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                45      </div>
      </div>
  <div class="content">
    <div class="qtext">
  What will be the result of an attempt to compile and run the following code? <br><br>public class Test <br>{<br>
<div style="margin-left: 40px;"> public static void main(String[] args) <br>{<br>
  <div style="margin-left: 40px;"> float i=0;<br> final byte j=5;<br> final short s=4;<br> while(i&lt;5)<br>{ <br>
    <div style="margin-left: 40px;">switch((int)i+2){ //1 <br>
      <div style="margin-left: 40px;">default: //2<br> case j:<br>
        <div style="margin-left: 40px;"> System.out.println("one"); //3<br></div>
        <div style="margin-left: 40px;"> break;<br></div> case s+1: //4 <br>{ <br>
        <div style="margin-left: 40px;">System.out.println("two");<br> break;<br></div> }<br></div> }<br>i++; <br></div>} <br></div>} <br></div>}</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5369_22853" name="resp5369_" type="radio" value="22853">        </td>
        <td class="c1 text ">
          <label for="resp5369_22853">
            <span class="anun">a<span class="anumsep">.</span></span> Compiler error on line 1            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5369_22854" name="resp5369_" type="radio" value="22854">        </td>
        <td class="c1 text ">
          <label for="resp5369_22854">
            <span class="anun">b<span class="anumsep">.</span></span> Compiler error on line 2            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5369_22855" name="resp5369_" type="radio" value="22855">        </td>
        <td class="c1 text ">
          <label for="resp5369_22855">
            <span class="anun">c<span class="anumsep">.</span></span> Compiler error on line 3            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5369_22856" name="resp5369_" checked="checked" type="radio" value="22856">        </td>
        <td class="c1 text correct">
          <label for="resp5369_22856">
            <span class="anun">d<span class="anumsep">.</span></span> Compiler error on line 4            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5369_22857" name="resp5369_" type="radio" value="22857">        </td>
        <td class="c1 text ">
          <label for="resp5369_22857">
            <span class="anun">e<span class="anumsep">.</span></span> Compiles and runs without errors            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2046%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5371" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                46      </div>
      </div>
  <div class="content">
    <div class="qtext">
  Given the following two classes, which statement is true?<br><br> package pack;<br> <br>public class Parent<br>{ <br>
<div style="margin-left: 40px;">protected void test()<br>{<br></div>
<div style="margin-left: 80px;"> System.out.println("Test");<br></div>
<div style="margin-left: 40px;"> } <br></div>} <br><br>1. package mypack; <br>2. import pack.*; <br>3. class ParentTest extends Parent{ <br>4. public static void main(String[] args){ <br>5. new ParentTest().test(); <br>6. new Parent().test(); <br>7. } <br>8. }</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5371_22863" name="resp5371_" type="radio" value="22863">        </td>
        <td class="c1 text ">
          <label for="resp5371_22863">
            <span class="anun">a<span class="anumsep">.</span></span> The code will compile and run only if line 5 is removed.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5371_22864" name="resp5371_" checked="checked" type="radio" value="22864">        </td>
        <td class="c1 text correct">
          <label for="resp5371_22864">
            <span class="anun">b<span class="anumsep">.</span></span> The code will compile and run only if line 6 is removed            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5371_22865" name="resp5371_" type="radio" value="22865">        </td>
        <td class="c1 text ">
          <label for="resp5371_22865">
            <span class="anun">c<span class="anumsep">.</span></span> The code compiles and runs, printing "Test" twice.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5371_22866" name="resp5371_" type="radio" value="22866">        </td>
        <td class="c1 text ">
          <label for="resp5371_22866">
            <span class="anun">d<span class="anumsep">.</span></span> The code compiles but throws an exception at runtime.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2047%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5372" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                47      </div>
      </div>
  <div class="content">
    <div class="qtext">
  What will happen when we try to compile the following code?<br>
 <br>
 1.      public void WhichArray( Object x ) <br>
 2.      {<br>
 3.              if( x instanceof int[] ) <br>
 4.              {<br>
 5.                      int[] n = (int[]) x ;<br>
 6.                      for( int i = 0 ; i &lt; n.length ; i++ )<br>
 7.                      {<br>
 8.                              System.out.println("integers = " + n[i] );<br>
 9.                      }<br>
 10.             }    <br>
 11.             if( x instanceof String[] ) <br>
 12.             {<br>
 13.                     System.out.println("Array of Strings");<br>
 14.             }<br>
 15.     }</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5372_22867" name="resp5372_" type="radio" value="22867">        </td>
        <td class="c1 text ">
          <label for="resp5372_22867">
            <span class="anun">a<span class="anumsep">.</span></span> The compiler objects to line 3 comparing an Object with an array.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5372_22868" name="resp5372_" type="radio" value="22868">        </td>
        <td class="c1 text ">
          <label for="resp5372_22868">
            <span class="anun">b<span class="anumsep">.</span></span> The compiler objects to line 5 casting an Object to an array of int primitives.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5372_22869" name="resp5372_" type="radio" value="22869">        </td>
        <td class="c1 text ">
          <label for="resp5372_22869">
            <span class="anun">c<span class="anumsep">.</span></span> The compiler objects to line 11 comparing an Object to an array of Objects.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5372_22870" name="resp5372_" checked="checked" type="radio" value="22870">        </td>
        <td class="c1 text correct">
          <label for="resp5372_22870">
            <span class="anun">d<span class="anumsep">.</span></span> It compiles without error.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2048%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5373" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                48      </div>
      </div>
  <div class="content">
    <div class="qtext">
  What is the result of compiling and running the following code?<br> <br>abstract class Test<br>{ <br>
<div style="margin-left: 40px;"> void test()<br> {<br>
  <div style="margin-left: 40px;"> System.out.println("Super"); <br></div> } <br></div>} <br><br>protected class SubTest extends Test<br>{ <br>
<div style="margin-left: 40px;"> void test()<br></div>
<div style="margin-left: 40px;"> {<br>
  <div style="margin-left: 40px;"> System.out.println("Sub"); <br></div> } <br></div>} <br><br>public class AccessTest<br>{ <br>
<div style="margin-left: 40px;"> public static void main(String[] args)<br> { <br>
  <div style="margin-left: 40px;"> Test t=new SubTest(); <br> t.test(); <br></div> } <br></div>}</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5373_22871" name="resp5373_" type="radio" value="22871">        </td>
        <td class="c1 text ">
          <label for="resp5373_22871">
            <span class="anun">a<span class="anumsep">.</span></span> Compiler Error: Abstract class Test must contain at least one abstract method            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5373_22872" name="resp5373_" type="radio" value="22872">        </td>
        <td class="c1 text ">
          <label for="resp5373_22872">
            <span class="anun">b<span class="anumsep">.</span></span> Prints "Super"            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5373_22873" name="resp5373_" checked="checked" type="radio" value="22873">        </td>
        <td class="c1 text ">
          <label for="resp5373_22873">
            <span class="anun">c<span class="anumsep">.</span></span> Prints "Sub"            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_big.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5373_22874" name="resp5373_" type="radio" value="22874">        </td>
        <td class="c1 text correct">
          <label for="resp5373_22874">
            <span class="anun">d<span class="anumsep">.</span></span> None of these            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_small.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2049%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5374" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                49      </div>
      </div>
  <div class="content">
    <div class="qtext">
  Given the following main method in a class called Cycle and a command line as shown below: <br><br>java Cycle one two. <br><br>What will be output?<br><br> class Cycle<br>{<br>
<div style="margin-left: 40px;"> public static void main(String[] bicycle)<br> { <br>
  <div style="margin-left: 40px;">System.out.println(bicycle[0]);<br></div> }<br></div> }</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5374_22875" name="resp5374_" type="radio" value="22875">        </td>
        <td class="c1 text ">
          <label for="resp5374_22875">
            <span class="anun">a<span class="anumsep">.</span></span> Compiler error            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5374_22876" name="resp5374_" type="radio" value="22876">        </td>
        <td class="c1 text ">
          <label for="resp5374_22876">
            <span class="anun">b<span class="anumsep">.</span></span> Prints "Cycle"            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5374_22877" name="resp5374_" checked="checked" type="radio" value="22877">        </td>
        <td class="c1 text correct">
          <label for="resp5374_22877">
            <span class="anun">c<span class="anumsep">.</span></span> Prints "one"            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5374_22878" name="resp5374_" type="radio" value="22878">        </td>
        <td class="c1 text ">
          <label for="resp5374_22878">
            <span class="anun">d<span class="anumsep">.</span></span> Prints "Two"            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2050%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5375" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                50      </div>
      </div>
  <div class="content">
    <div class="qtext">
  The following line of code is equivalent to which of the given codes? Select two choices.<br><br>if(x &gt; y) <br>
<div style="margin-left: 40px;">z = x; <br></div>else<br>
<div style="margin-left: 40px;"> z = y;</div></div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose at least one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5375_22879" name="resp5375_22879" type="checkbox" value="22879">        </td>
        <td class="c1 text ">
          <label for="resp5375_22879">
            <span class="anun">a<span class="anumsep">.</span></span> z = x &lt; y ? x : y            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5375_22880" name="resp5375_22880" type="checkbox" value="22880">        </td>
        <td class="c1 text correct">
          <label for="resp5375_22880">
            <span class="anun">b<span class="anumsep">.</span></span> z = x &lt; y ? y : x            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_small.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5375_22881" name="resp5375_22881" checked="checked" type="checkbox" value="22881">        </td>
        <td class="c1 text correct">
          <label for="resp5375_22881">
            <span class="anun">c<span class="anumsep">.</span></span> z = y &lt; x ? x : y            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5375_22882" name="resp5375_22882" type="checkbox" value="22882">        </td>
        <td class="c1 text ">
          <label for="resp5375_22882">
            <span class="anun">d<span class="anumsep">.</span></span> z = y &lt; x ? y : x            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5375_22883" name="resp5375_22883" type="checkbox" value="22883">        </td>
        <td class="c1 text ">
          <label for="resp5375_22883">
            <span class="anun">e<span class="anumsep">.</span></span> None of the above            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2051%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5376" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                51      </div>
      </div>
  <div class="content">
    <div class="qtext">
  What will be written to the standard output when the following program is executed?<br><br> public class Test <br>{ <br>
<div style="margin-left: 40px;">int a; <br>int b;<br> <br>public void f() <br>{<br>
  <div style="margin-left: 40px;"> a = 0;<br> b = 0;<br> int[] c = { 0 }; <br>g(b, c);<br> System.out.println(a + " " + b + " " + c[0] + " ");<br></div> }<br> <br>public void g(int b, int[] c) <br>{ <br>
  <div style="margin-left: 40px;">a = 1; <br>b = 1; <br>c[0] = 1;<br></div> }<br> <br>public static void main(String[] args) <br>{<br>
  <div style="margin-left: 40px;"> Test obj = new Test(); <br>obj.f();<br></div> }<br></div> }<br></div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5376_22884" name="resp5376_" type="radio" value="22884">        </td>
        <td class="c1 text ">
          <label for="resp5376_22884">
            <span class="anun">a<span class="anumsep">.</span></span> 0 0 0            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5376_22885" name="resp5376_" type="radio" value="22885">        </td>
        <td class="c1 text ">
          <label for="resp5376_22885">
            <span class="anun">b<span class="anumsep">.</span></span> 0 0 1            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5376_22886" name="resp5376_" type="radio" value="22886">        </td>
        <td class="c1 text ">
          <label for="resp5376_22886">
            <span class="anun">c<span class="anumsep">.</span></span> 0 1 0            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5376_22887" name="resp5376_" type="radio" value="22887">        </td>
        <td class="c1 text ">
          <label for="resp5376_22887">
            <span class="anun">d<span class="anumsep">.</span></span> 1 0 0            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5376_22888" name="resp5376_" checked="checked" type="radio" value="22888">        </td>
        <td class="c1 text correct">
          <label for="resp5376_22888">
            <span class="anun">e<span class="anumsep">.</span></span> 1 0 1            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2052%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5377" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                52      </div>
      </div>
  <div class="content">
    <div class="qtext">
  Which of the following statements are true about the following code fragment? <br><br>1. int a = 1; <br>2. String [] names = { "John", "Merry", "Tom"}; <br>3. names[--a] += "-"; <br>4. for (int i = 0; i &lt; names.length; i++) <br>5. { <br>6. System.out.println(names[i]); <br>7. }</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5377_22889" name="resp5377_" checked="checked" type="radio" value="22889">        </td>
        <td class="c1 text correct">
          <label for="resp5377_22889">
            <span class="anun">a<span class="anumsep">.</span></span> The output starts with "John-".            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5377_22890" name="resp5377_" type="radio" value="22890">        </td>
        <td class="c1 text ">
          <label for="resp5377_22890">
            <span class="anun">b<span class="anumsep">.</span></span> The output starts with "John" and includes "Merry-".            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5377_22891" name="resp5377_" type="radio" value="22891">        </td>
        <td class="c1 text ">
          <label for="resp5377_22891">
            <span class="anun">c<span class="anumsep">.</span></span> An ArrayIndexOutOfBoundException is thrown.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5377_22892" name="resp5377_" type="radio" value="22892">        </td>
        <td class="c1 text ">
          <label for="resp5377_22892">
            <span class="anun">d<span class="anumsep">.</span></span> None of these.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2053%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5378" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                53      </div>
      </div>
  <div class="content">
    <div class="qtext">
  Which of the following operators will always evaluate all the operands? Select two choices.<br></div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose at least one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5378_22893" name="resp5378_22893" checked="checked" type="checkbox" value="22893">        </td>
        <td class="c1 text ">
          <label for="resp5378_22893">
            <span class="anun">a<span class="anumsep">.</span></span> ||            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_big.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5378_22894" name="resp5378_22894" type="checkbox" value="22894">        </td>
        <td class="c1 text correct">
          <label for="resp5378_22894">
            <span class="anun">b<span class="anumsep">.</span></span> +            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_small.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5378_22895" name="resp5378_22895" checked="checked" type="checkbox" value="22895">        </td>
        <td class="c1 text ">
          <label for="resp5378_22895">
            <span class="anun">c<span class="anumsep">.</span></span> &amp;&amp;            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_big.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5378_22896" name="resp5378_22896" type="checkbox" value="22896">        </td>
        <td class="c1 text ">
          <label for="resp5378_22896">
            <span class="anun">d<span class="anumsep">.</span></span> ? :            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5378_22897" name="resp5378_22897" type="checkbox" value="22897">        </td>
        <td class="c1 text correct">
          <label for="resp5378_22897">
            <span class="anun">e<span class="anumsep">.</span></span> %            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_small.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2054%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5380" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                54      </div>
      </div>
  <div class="content">
    <div class="qtext">
  After which line is the object created on line 2 eligible for garbage collection? <br><br>public class Test <br>{ <br>
<div style="margin-left: 40px;">public static void main(String[] args) <br>{ <br>
  <div style="margin-left: 40px;">String msg; //1 <br>String a=new String("abc"); //2 <br>String b=null; //3 <br>b=a; //4 <br>a=new String("abc"); //5 <br>b+="de"; //6 <br>System.out.println(b); //7 <br>b=null; //8 <br></div>}<br></div> }</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5380_22902" name="resp5380_" type="radio" value="22902">        </td>
        <td class="c1 text ">
          <label for="resp5380_22902">
            <span class="anun">a<span class="anumsep">.</span></span> 4            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5380_22903" name="resp5380_" type="radio" value="22903">        </td>
        <td class="c1 text ">
          <label for="resp5380_22903">
            <span class="anun">b<span class="anumsep">.</span></span> 5            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5380_22904" name="resp5380_" checked="checked" type="radio" value="22904">        </td>
        <td class="c1 text correct">
          <label for="resp5380_22904">
            <span class="anun">c<span class="anumsep">.</span></span> 6            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5380_22905" name="resp5380_" type="radio" value="22905">        </td>
        <td class="c1 text ">
          <label for="resp5380_22905">
            <span class="anun">d<span class="anumsep">.</span></span> 7            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5380_22906" name="resp5380_" type="radio" value="22906">        </td>
        <td class="c1 text ">
          <label for="resp5380_22906">
            <span class="anun">e<span class="anumsep">.</span></span> None of the above            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2055%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5381" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                55      </div>
      </div>
  <div class="content">
    <div class="qtext">
  How many objects are eligible for garbage collection by the time the method f() is invoked?<br><br> class MyClass <br>{ <br>
<div style="margin-left: 40px;">private MyClass z;<br> <br>public void other(MyClass c) <br>{<br>
  <div style="margin-left: 40px;">z = c;<br></div>}<br> protected void finalize()<br>{<br>
  <div style="margin-left: 40px;">System.out.println("called");<br></div>} <br></div>} <br><br>class Test <br>{ <br>
<div style="margin-left: 40px;">private static void f() { }<br><br> public static void main (String[] args) <br>{<br>
  <div style="margin-left: 40px;"> MyClass c1 = new MyClass();<br> MyClass c2 = new MyClass();<br> c1.other(c2);<br> c2.other(c1);<br> MyClass c3=new MyClass();<br> c1=c3;<br> c2=c3;<br> f();<br></div> }<br></div> }<br></div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5381_22907" name="resp5381_" type="radio" value="22907">        </td>
        <td class="c1 text ">
          <label for="resp5381_22907">
            <span class="anun">a<span class="anumsep">.</span></span> 1            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5381_22908" name="resp5381_" type="radio" value="22908">        </td>
        <td class="c1 text correct">
          <label for="resp5381_22908">
            <span class="anun">b<span class="anumsep">.</span></span> 2            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_small.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5381_22909" name="resp5381_" type="radio" value="22909">        </td>
        <td class="c1 text ">
          <label for="resp5381_22909">
            <span class="anun">c<span class="anumsep">.</span></span> 3            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5381_22910" name="resp5381_" type="radio" value="22910">        </td>
        <td class="c1 text ">
          <label for="resp5381_22910">
            <span class="anun">d<span class="anumsep">.</span></span> Code does not compile            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5381_22911" name="resp5381_" checked="checked" type="radio" value="22911">        </td>
        <td class="c1 text ">
          <label for="resp5381_22911">
            <span class="anun">e<span class="anumsep">.</span></span> None of the above            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_big.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2056%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q16283" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                56      </div>
      </div>
  <div class="content">
    <div class="qtext">
  Choose the statements which are TRUE.<br>(Choose two options)<br></div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose at least one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp16283_61903" name="resp16283_61903" checked="checked" type="checkbox" value="61903">        </td>
        <td class="c1 text correct">
          <label for="resp16283_61903">
            <span class="anun">a<span class="anumsep">.</span></span> IS-A relationship : Inheritance.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp16283_61904" name="resp16283_61904" checked="checked" type="checkbox" value="61904">        </td>
        <td class="c1 text ">
          <label for="resp16283_61904">
            <span class="anun">b<span class="anumsep">.</span></span> The extent to which a class uses other classes : Composition .            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_big.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp16283_61905" name="resp16283_61905" type="checkbox" value="61905">        </td>
        <td class="c1 text ">
          <label for="resp16283_61905">
            <span class="anun">c<span class="anumsep">.</span></span> HAS-A relationship : Coupling.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp16283_61906" name="resp16283_61906" type="checkbox" value="61906">        </td>
        <td class="c1 text correct">
          <label for="resp16283_61906">
            <span class="anun">d<span class="anumsep">.</span></span> The extent to which methods in a class are related : Cohesion.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_small.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2057%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5382" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                57      </div>
      </div>
  <div class="content">
    <div class="qtext">
  Which of the following statements are true about the relationships between the following classes? Select three choices.<br><br>class Foo <br>{<br>
<div style="margin-left: 40px;"> int num; <br> Baz comp = new Baz(); <br></div>} <br>class Bar <br>{<br>
<div style="margin-left: 40px;"> boolean flag; <br></div>} <br>class Baz extends Foo <br>{ <br>
<div style="margin-left: 40px;">Bar thing = new Bar(); <br> double limit; <br></div>}</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose at least one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5382_22912" name="resp5382_22912" type="checkbox" value="22912">        </td>
        <td class="c1 text ">
          <label for="resp5382_22912">
            <span class="anun">a<span class="anumsep">.</span></span> A Bar is a Baz.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5382_22913" name="resp5382_22913" checked="checked" type="checkbox" value="22913">        </td>
        <td class="c1 text correct">
          <label for="resp5382_22913">
            <span class="anun">b<span class="anumsep">.</span></span> A Foo has a Baz.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5382_22914" name="resp5382_22914" checked="checked" type="checkbox" value="22914">        </td>
        <td class="c1 text correct">
          <label for="resp5382_22914">
            <span class="anun">c<span class="anumsep">.</span></span> A Baz is a Foo.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5382_22915" name="resp5382_22915" type="checkbox" value="22915">        </td>
        <td class="c1 text ">
          <label for="resp5382_22915">
            <span class="anun">d<span class="anumsep">.</span></span> A Foo is a Baz.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5382_22916" name="resp5382_22916" checked="checked" type="checkbox" value="22916">        </td>
        <td class="c1 text correct">
          <label for="resp5382_22916">
            <span class="anun">e<span class="anumsep">.</span></span> A Baz has a Bar.            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_big.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2058%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5383" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                58      </div>
      </div>
  <div class="content">
    <div class="qtext">
  Which statement, when inserted at the indicated position in the following code, will cause a runtime exception to be thrown? <br><br>class A {} <br>class B extends A {}<br> class C extends A {}<br> public class Test <br>{<br>
<div style="margin-left: 40px;"> public static void main(String[] args) <br>{<br>
  <div style="margin-left: 40px;"> A x = new A();<br> B y = new B();<br> C z = new C();<br> // insert statement here <br></div>}<br></div> }</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5383_22917" name="resp5383_" type="radio" value="22917">        </td>
        <td class="c1 text ">
          <label for="resp5383_22917">
            <span class="anun">a<span class="anumsep">.</span></span> x = y;            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5383_22918" name="resp5383_" checked="checked" type="radio" value="22918">        </td>
        <td class="c1 text ">
          <label for="resp5383_22918">
            <span class="anun">b<span class="anumsep">.</span></span> z = x;            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_big.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5383_22919" name="resp5383_" type="radio" value="22919">        </td>
        <td class="c1 text correct">
          <label for="resp5383_22919">
            <span class="anun">c<span class="anumsep">.</span></span> y = (B) x;            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_small.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5383_22920" name="resp5383_" type="radio" value="22920">        </td>
        <td class="c1 text ">
          <label for="resp5383_22920">
            <span class="anun">d<span class="anumsep">.</span></span> z = (C) y;            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5383_22921" name="resp5383_" type="radio" value="22921">        </td>
        <td class="c1 text ">
          <label for="resp5383_22921">
            <span class="anun">e<span class="anumsep">.</span></span> y = (A) y;            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2059%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5384" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                59      </div>
      </div>
  <div class="content">
    <div class="qtext">
  What will happen when you attempt to compile and run the following code?<br><br> class Base <br>{ <br>
<div style="margin-left: 40px;">private void aMethod(int iBase)<br> { <br>
  <div style="margin-left: 40px;">System.out.println("Base"); <br></div>} <br></div>}<br> <br>class Over extends Base <br>{<br>
<div style="margin-left: 40px;"> public static void main(String[] argv) <br>{ <br>
  <div style="margin-left: 40px;">Base o = new Over();<br> int iBase = 0; <br>o.aMethod(iBase);<br></div> }<br> public void aMethod(int iOver)<br> { <br>
  <div style="margin-left: 40px;">System.out.println("Over");<br></div> } <br></div>}</div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5384_22922" name="resp5384_" type="radio" value="22922">        </td>
        <td class="c1 text correct">
          <label for="resp5384_22922">
            <span class="anun">a<span class="anumsep">.</span></span> Compiler error            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_small.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5384_22923" name="resp5384_" type="radio" value="22923">        </td>
        <td class="c1 text ">
          <label for="resp5384_22923">
            <span class="anun">b<span class="anumsep">.</span></span> Prints "Base"            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5384_22924" name="resp5384_" checked="checked" type="radio" value="22924">        </td>
        <td class="c1 text ">
          <label for="resp5384_22924">
            <span class="anun">c<span class="anumsep">.</span></span> Prints "Over"            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_big.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5384_22925" name="resp5384_" type="radio" value="22925">        </td>
        <td class="c1 text ">
          <label for="resp5384_22925">
            <span class="anun">d<span class="anumsep">.</span></span> ClassCastException            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>
<div style="float:left"><a href="mailto:support@whizlabs.com?subject=Feedback%20to%20author%20for%20Question%2060%20of%20Quiz%20Practice%20Test%20II%20(ID:%201775),%20Course%20ID:%2011">Feedback to Author</a></div><div id="q5385" class="que multichoice clearfix">
  <div class="info">
    <span class="no"><span class="accesshide">Question </span></span>
          <div class="grade">
                60      </div>
      </div>
  <div class="content">
    <div class="qtext">
  Which of the following methods can be legally inserted in place of the comment //Method Here? Select two choices.<br><br>class Base <br>{ <br>
<div style="margin-left: 40px;">public void aMethod(int i) { }<br></div>} <br><br>public class Scope extends Base <br>{<br>
<div style="margin-left: 40px;"> public static void main(String[] argv) { }<br></div>
<div style="margin-left: 40px;">//Method Here <br></div>}<br></div>


<div class="ablock clearfix">
  <div class="prompt">
    Choose at least one answer.  </div>

  <table class="answer">
          <tbody><tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5385_22926" name="resp5385_22926" type="checkbox" value="22926">        </td>
        <td class="c1 text ">
          <label for="resp5385_22926">
            <span class="anun">a<span class="anumsep">.</span></span> void aMethod(int i) throws Exception {}            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5385_22927" name="resp5385_22927" type="checkbox" value="22927">        </td>
        <td class="c1 text correct">
          <label for="resp5385_22927">
            <span class="anun">b<span class="anumsep">.</span></span> void aMethod(long i)throws Exception {}            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_small.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r0">
        <td class="c0 control">
          <input disabled="disabled" id="resp5385_22928" name="resp5385_22928" type="checkbox" value="22928">        </td>
        <td class="c1 text correct">
          <label for="resp5385_22928">
            <span class="anun">c<span class="anumsep">.</span></span> void aMethod(long i){}            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/tick_green_small.gif" alt="Correct" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
          <tr class="r1">
        <td class="c0 control">
          <input disabled="disabled" id="resp5385_22929" name="resp5385_22929" type="checkbox" value="22929">        </td>
        <td class="c1 text ">
          <label for="resp5385_22929">
            <span class="anun">d<span class="anumsep">.</span></span> public void aMethod(int i) throws Exception {}            <img src="./OCPJP 6 - Exam Simulator  Practice Test II_files/cross_red_small.gif" alt="Incorrect" class="icon">          </label>
        </td>
        <td class="c0 feedback">
                  </td>
      </tr>
      </tbody></table>
    </div>
    <div class="grading">
          </div>  </div>
</div>

<div class="controls">
<div class="singlebutton"><form action="http://www.whizlabs.com/examprep/mod/quiz/view.php" method="get"><div><input type="hidden" name="id" value="2203"><input type="submit" value="Finish review"></div></form></div></div>
<!--Start - Display Buttons with their course prices in each moodle pages: Devesh M-->
				
		<!--Start - Display Buy Mock Exam Full Version button with price at trial course page only: Devesh M-->
				<!--End - Display Buy Mock Exam Full Version button with price at trial course page only: Devesh M-->
  <div id="leftfooter" style="display: none; "></div><div id="rightfooter" style="display: none; "><p class="footertopma">Thanks Whizlabs for such an excellent product. It really helped me a lot for my achivement. -Nazmul<span class="more"><a href="http://www.whizlabs.com/examprep/mod/quiz/review.php?attempt=170626&showall=true#" class="amore"> more</a></span></p>

  </div>

  <div id="rightfooter2" style="display: none; "><p class="copyright">Whizlabs Copyright (C) 2011. All Rights Reserved.</p></div>
<script language="javascript">
	if(document.getElementById("left-column")) {
	
	}
	else {
		document.getElementById('leftfooter').style.display='none';
		document.getElementById('rightfooter').style.display='none';
		document.getElementById('rightfooter2').style.display='none';
	}
</script>
  <div id="footerbottom">
    
 <center>
	<div style="border:0px solid #FFFFFF; font-size:11px; font-family:Arial, Helvetica, sans-serif; font-weight:bold; color:#000;">
		<br>
		<span><a href="http://www.whizlabs.com/scja/scja.html" title="SCJA Certification" style="text-decoration:none; color:#000;">SCJA Certification</a></span> |
		<span><a href="http://www.whizlabs.com/scjp/scjp.html" title="SCJP Certification" style="text-decoration:none; color:#000;">SCJP Certification</a></span> |
		<span><a href="http://www.whizlabs.com/scwcd/scwcd.html" title="SCWCD Certification" style="text-decoration:none; color:#000;">SCWCD Certification</a></span> |
		<span><a href="http://www.whizlabs.com/scbcd/scbcd.html" title="SCBCD Certification" style="text-decoration:none; color:#000;">SCBCD Certification</a></span> |
		<span><a href="http://www.whizlabs.com/scdjws/scdjws.html" title="SCDJWS Certification" style="text-decoration:none; color:#000;">SCDJWS Certification</a></span> |
		<span><a href="http://www.whizlabs.com/scmad/scmad.html" title="SCMAD Certification" style="text-decoration:none; color:#000;">SCMAD Certification</a></span> |
		<span><a href="http://www.whizlabs.com/scea/scea.html" title="SCEA Certification" style="text-decoration:none; color:#000;">SCEA Certification</a></span>

		<br><br>
		<span><a href="http://www.whizlabs.com/otherpages/legal.html" alt="coming soon" style="text-decoration:none; color:#000;">Legal</a></span> |
		<span><a href="http://www.whizlabs.com/otherpages/policies.html" alt="coming soon" style="text-decoration:none; color:#000;">Policies</a></span> |
		<span><a href="http://www.whizlabs.com/otherpages/copyrights-and-trademarks.html" alt="coming soon" style="text-decoration:none; color:#000;"> Copyrights and Trademarks</a></span>
	</div>
	<br>
</center>
</div>
 </div>

<!--End - Display Buttons with their course prices in each moodle pages: Devesh M-->
<!--Footer links for each moodle pages-->


<!--Google Adwords Code Start: Devesh M-->
	<!--quiz/review.php--> 
	<!-- Google Code for Trial Test Reviewed Conversion Page --> 
	<script type="text/javascript">
	<!--
	var google_conversion_id = 1071861065;
	var google_conversion_language = "en";
	var google_conversion_format = "2";
	var google_conversion_color = "ffffff";
	var google_conversion_label = "YhFjCNjMogEQyZqN_wM"; var google_conversion_value = 0; //--> </script> <script type="text/javascript" src="./OCPJP 6 - Exam Simulator  Practice Test II_files/conversion.js">
	</script><iframe name="google_conversion_frame" width="200" height="26" src="./OCPJP 6 - Exam Simulator  Practice Test II_files/saved_resource.htm" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no">&lt;img height="1" width="1" border="0" src="http://www.googleadservices.com/pagead/conversion/1071861065/?frame=0&amp;random=1324152518118&amp;cv=7&amp;fst=1324152518118&amp;num=1&amp;fmt=2&amp;value=0&amp;label=YhFjCNjMogEQyZqN_wM&amp;bg=ffffff&amp;hl=en&amp;guid=ON&amp;u_h=900&amp;u_w=1600&amp;u_ah=868&amp;u_aw=1600&amp;u_cd=32&amp;u_his=8&amp;u_tz=-120&amp;u_java=true&amp;u_nplug=16&amp;u_nmime=65&amp;ref=http%3A//www.whizlabs.com/examprep/mod/quiz/review.php%3Fattempt%3D170626&amp;url=http%3A//www.whizlabs.com/examprep/mod/quiz/review.php%3Fattempt%3D170626%26showall%3Dtrue" /&gt;</iframe>
	<noscript>
	&lt;div style="display:inline;"&gt;
	&lt;img height="1" width="1" style="border-style:none;" alt=""
	src="http://www.googleadservices.com/pagead/conversion/1071861065/?label=YhF
	jCNjMogEQyZqN_wM&amp;amp;guid=ON&amp;amp;script=0"/&gt;
	&lt;/div&gt;
	</noscript>
<!--Google Adwords Code End : Devesh M-->

<!--OnTarget Code Start: Devesh M-->
<script language="JavaScript">
	var s_PageName = "OCPJP 6 - Exam Simulator: Practice Test II";

			</script>

<!--End of OnTarget Code: Devesh M-->

<!-- Start of Google Analytics Code: Devesh M-->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script><script src="./OCPJP 6 - Exam Simulator  Practice Test II_files/ga.js" type="text/javascript"></script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-320509-1");
pageTracker._trackPageview();
} catch(err) {}</script>
<!--End of Google Analytics Code: Devesh M-->



</body></html>